hdw3
hdw3

Reputation: 951

How to schedule AWS Lambda to run with different frequency based on the hour

Is it possible to trigger lambda function with different frequency throughout the day, based on the hour? For exmaple I would like to trigger lambda function hourly 6am-12pm and then once per 6 hours 12pm-6am.

Bold hours are when I would like to trigger lambda:
12am 1am 2am 3am 4am 5am 6am 7am 8am 9am 10am 11am 12pm 1pm 2pm 3pm 4pm 5pm 6pm 7pm 8pm 9pm 10pm 11pm

Time zone is irrelevant

Upvotes: 0

Views: 617

Answers (1)

jellycsc
jellycsc

Reputation: 12259

You can setup 2 CloudWatch event rules to trigger lambdas with different frequency. https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/RunLambdaSchedule.html

Upvotes: 1

Related Questions