Reputation: 153
I am new to AWS lambda. Will like to seek advice from the experts here. I understand that Lambda is activated based on a trigger. If I wanted to send a timed http request (for example, send a http request 4 hours later), is there any recommendations to do it.
Upvotes: 2
Views: 302
Reputation: 68715
Yes, you can configure scheduled AWS Lambda Triggers using Cloudwatch.
Tutorial: Schedule AWS Lambda Functions Using CloudWatch Events
To create a rule using the console
- Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/
- In the navigation pane, choose Events, Create rule.
For Event Source, do the following:
a. Choose Schedule.
b. Choose Fixed rate of and specify the schedule interval (for example, 5 minutes).
For Targets, choose Add target, Lambda function.
For Function, select the Lambda function that you created.
Choose Configure details.
For Rule definition, type a name and description for the rule.
Choose Create rule.
Upvotes: 3