- 最新
- 最多得票
- 最多評論
-
You can use DynamoDB Streams to trigger a lambda function - https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.Lambda.html https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html
-
It is not advisable to sleep inside of a lambda function. Instead you could invoke a Step Function from within the lambda function - https://docs.aws.amazon.com/step-functions/latest/dg/concepts-invoke-sfn.html
-
to use the Wait Task to sleep for 5 minutes - https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-wait-state.html
-
Finally, after the sleep, you can invoke another lambda function from the Step Function that will trigger off whatever you want to do after the 5 minute sleep - https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-task-state.html
Note that in Step 1, it is possible for multiple records to be delivered by DynamoDB streams to your lambda function as an array of records, so you can invoke one instance of the step function state machine for each record
EvenBridge cron are used for recurring events. Not for one time tasks. What you should do is setup a DynamoDB stream, attach it to a Lambda function. The Lambda function will send a message to an SQS Delay queue. The queue will trigger a second function that will perform the task.
If you want to eliminate the use of the first function and the DynamoDB stream, you can have the application that writes to DynamoDB to send the message to the Delay queue directly.
相關內容
- 已提問 1 年前
- AWS 官方已更新 7 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 6 個月前
- AWS 官方已更新 1 年前