DEV Community

Discussion on: How to Schedule Any Task with AWS Lambda

Collapse
 
jdrydn profile image
James

We cannot customize how Lambda will run based only on what the scheduler provides, like we did with DynamoDB and S3.

Using the "Constant JSON text" as the screenshot shows, you can configure the input for the function. so you could have multiple for schedules for the same function with different inputs:

rate(1 minute) → {"rate":"EVERY-MINUTE"}
cron(*/10 * * * ? *) → {"rate":"EVERY-TEN-MINUTES"}
Collapse
 
byrro profile image
Renato Byrro

Hi James, thanks for the comment!

I'm replying a bit late, but what I wanted to mean was that DynamoDB and S3 can provide more information to be processed. In the case of Dynamo, we can receive the entire object with the invocation, as well as its state prior to the change.

With CloudWatch Rules, it's just a rule. Unless it's a self-contained task, Lambda will probably need to go get more data somewhere else to actually process what it's supposed to.