Lambda function behavior with schedule event after deploy

398 views Asked by At

So, at first, I deploy my function with config like this for debugging purposes

...
functions:
  myFunc:
    handler: myFunc.handler
    timeout: 300
    events:
      - schedule:
          name: event-name
          description: "event-name description"
          rate: rate(10 minute)
...

Then, I decided to change schedule rate to 1 day

I got 2 questions:

  • Will the event be called every day from the moment of deployment or from the last 10 minutes trigger?
  • After the next deployment, the event's execution time will remain the same, or will start from the time of deployment?
1

There are 1 answers

0
Marcin On BEST ANSWER

From docs:

A rate expression starts when you create the scheduled event rule, and then runs on its defined schedule.

After update, the rule stays the same, unless your update changes the rule. CloudFormation does not re-deploy resource which do not change when a resource is not affected by the update process.