- Newest
- Most votes
- Most comments
If your warm lambda function is accumulating memory for each execution, then it is not being idempotent. It means that every execution it is not unique and the result out of it is changing after each execution.
I would recommend to review the source code to make sure that your lambda is following the best practices when it comes to idempotency.
Take a look into this blog post [1] along with this article [2] which covers this topic.
Now if you really want to know how to cold start your lambda
The answer is easy, Make it fail. Every time that a lambda fails, the underlying container running your code gets terminated and a new one is created. This is not recommended to solve your concern, but for your knowledge, this is what happens when a lambda fails.
I hope this information is useful
Handling Lambda functions idempotency with AWS Lambda Powertools
How do I make my Lambda function idempotent?
[2] https://repost.aws/knowledge-center/lambda-function-idempotent
Relevant content
- asked 3 years ago
- asked 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago