nff
nff

Reputation: 151

Schedule AWS lambda function to invoke for specific interval

I have AWS lambda function written in c#, and I want to invoke that lambda function for the specific interval. This interval value is not fixed, and the user can customize this interval from the app. Any ideas on how to achieve this?

Upvotes: 2

Views: 520

Answers (2)

Matt D
Matt D

Reputation: 3496

One method is to programmatically update the schedule of a CloudWatch Scheduled Rule. This works well if you have a relatively low number of schedules, but there are limits to how many schedules you can create. The default limit is 50 rules, though this can be increased to meet your needs by requesting an increase from AWS.

This is an example of creating a rule programmatically in C#, you'll need to permission your Lambda Role to update the rules, also in this doc: https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/cloudwatch-examples-sending-events.html#create-a-scheduled-rule

Upvotes: 2

shoya
shoya

Reputation: 53

try Using AWS Lambda with Amazon SQS

SQS has each URL.
user (or some API) can send request to that url.

The outline of processing is as follows
user (or some API) -> SQS -> Lambda

Upvotes: 0

Related Questions