You can use DynamoDB TTL to easily implement this, just do the following:
1- Place the element with TTL , the exact time when you want to execute or call the lambda function.
2- Configure DynamoDB Streams to run the lambda function on the remove event of an element.
As soon as the item / record expires, your lambda will be activated. You do not need to delete or clear anything, since the element in Dynamodb has already disappeared.
NOTE. However, this approach is easy to implement and scales very well, but one precaution should be mentioned; Using DynamoDB TTL as a scheduling mechanism cannot guarantee accurate time accuracy, as there may be a delay. Scheduled tasks are completed a couple of minutes later.
source share