Open 20jasper opened 1 year ago
Schedule Lambda to run every Wednesday @ 6:30 PM EST with CRON
We need to add an event rule and a permission to invoke the lambda
SAM example
RefreshPermission: Type: AWS::Lambda::Permission Properties: Action: lambda:InvokeFunction FunctionName: !Ref YourLambda Principal: "events.amazonaws.com" SourceArn: !GetAtt YourLambdaEventRule.Arn YourLambdaEventRule: Type: AWS::Events::Rule Properties: Description: Scheduled Rule Name: String # Mins, hours, day-of-month, month, day-of-week, year # this example runs every sunday at 12AM utc ScheduleExpression: "cron(0 0 ? * SUN *)" State: ENABLED Targets: - Arn: !GetAtt YourLambdaFunction.Arn Id: targetFunction1
Warning Lambdas may not run exactly on the time, so we should look into how to tighten the window
Resources:
Cron Expression:
0 30 18 ? * WED *
Schedule Lambda to run every Wednesday @ 6:30 PM EST with CRON
We need to add an event rule and a permission to invoke the lambda
SAM example
Resources: