How to Avoid Lambda Cold Starts

Using Lambda Pings and Provision Concurrency to prevent Cold Start.

Chameera Dulanga
Enlear Academy

AWS Lambda is one of the most used AWS services around the world. Its automatic scaling behavior and cost-effective on-demand invoking mechanism have made it even more popular.

However, Lambda functions take significant time to get started initially, and this directly impacts application performance.

This behavior is known as cold starts, and in this article, I will discuss 2 methods to overcome this problem, and you can choose one based on your requirements and cost.

1. Using Lambda Ping

The first method to prevent cold-starts is using a CloudWatch event rule and scheduled event to ping the Lambda function regularly.

Usually, the Lambda execution environment has about 10 to 15 minutes of idle time, and if there were no Lambdas invoked during that time, the execution environment is removed.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Responses (1)

What are your thoughts?

Hi, Chameera Dulanga. If you want, you can submit your next articles in my publication. We are a team that try to grow our publication. If you accept this wish, we will be happy. :)

--