<@U02H1A95XDW> I think I have challenge with a Git...
# prefect-community
h
@Anna Geller I think I have challenge with a GitHub template, I’m trying to implement the serverless with Aws Lambda template on GitHub. Under the environment section of the
serverless.yml
file I don’t understand the KVPs
PREFECT_API_KEY
and
PREFECT_API_URL
are the values supposed to be variables or secrets and from where?
1
👍 1
a
API key should be a repository secret and the URL should be replaced via code
j
You can create the Prefect API key from the GUI. See instructions here. After creating an API key you should see the code in the GUI that you can use in your CLI to set the API key and url. After applying settings you can see them from the CLI with
prefect config view
. You can read more about settings and profiles.
h
@Anna Geller Ok. Similar question is the schedule section in the
serverless.yml
file. If I set a ``cron(0 13 ? MON-FRI *)`` do I need to set another/similar schedule when building deployment to store code in s3?
@Jeff Hale essentially I want to know whether the schedule set in the
serverless.yml
file suffices for the schedule for the flow itself or I have to set seminar schedule when pushing flow code to s3?
j
What’s the URL of repo you’re looking at?
a
@Hedgar the lambda demo has nothing to do with Prefect deployments -- Lambda use case is that you are running flows from Lambda and you use Prefect for local in-process orchestration and observability for deployments, check out https://discourse.prefect.io/t/prefect-deployments-faq/1467
h
@Anna Geller I understand. I just want to know if I schedule the Lambda to run the function every 10 mins, do I need to indicate similar schedule in my flow? My understanding is that lambda at the scheduled time pull the needed resources to run flow and afterwards go back to status quo. Thereby I don’t need t to provision Ec2 that runs 24/7?
a
do I need to indicate similar schedule in my flow?
no, Lambda is compute and it gets triggered on the schedule you defined as cloud watch event https://github.com/anna-geller/prefect-aws-lambda/blob/master/serverless.yml#L55