1 個回答
- 最新
- 最多得票
- 最多評論
0
If I understand correctly what you are asking, maybe you can store the amount of bucket tokens in a DynamoDB table and use DynamoDB Streams to invoke a Lambda every time it changes.
相關內容
- 已提問 6 個月前
- AWS 官方已更新 2 年前
If I understand correctly what you are asking, maybe you can store the amount of bucket tokens in a DynamoDB table and use DynamoDB Streams to invoke a Lambda every time it changes.
It's the same number of tokens every minute. Once we exhaust the tokens, we cannot process the jobs anymore, and need to wait until the minute runs out. Then try again. So we have to execute the Lambda once a minute. But then 15 days of the month, we have no jobs, because the batch is a monthly job, and it takes 14 days to complete. So then for the other half of the month, we keep executing Lambda which isn't doing anything. Just checks the queue and exits.