Using AWS Lambdas? 3 Important Considerations

 

AWS Lambdas are one of the best serverless services out there and we have discussed some it's benefits in a previous article

This article is going to show you the three important things consider before using AWS Lambda for your applications. You will gain a deeper understanding of the potential pitfalls of using Lambda so that you can avoid them. And who knows, a question like this might come up in your interview and you will be prepared to answer it if it does.

 

 

 

What is AWS Lambda

AWS Lambda is a serverless compute service designed to make it easy for developers to run their code without having to worry about managing servers.

 Lambda can be used for different use cases such as data processing, web applications, mobile backend, etc. It can be integrated with Amazon S3 and DynamoDB to build robust and scalable applications. 

 Here are the three things to bear in mind when deploying your applications to Lambda.

 

Time outs 

Lambda can run your code for a set amount of time without timing out. 

The default time is 3 seconds but it can be adjusted to a maximum of 15 minutes.

When the specific time out is reached, AWS Lambda terminates the execution of your Lambda function.  

The best way to protect against timeouts is to ensure that your application never needs to run for more than 15minutes. If your application runs for more than 15mins, then Lambda might not be the right choice for that application.

 

Cold Starts

A cold start issue is where a lambda takes a long time to start once it is triggered.

This usually occurs if the Lambda has not been used for a long time due to the underlying nature of how Lambdas work. The impact of cold starts is that it could cause application errors or delays due to the lambda not being ready for execution

To minimize cold starts, keep your function warm by invoking it periodically or configuring it to use provisioned concurrency. Provisioned concurrency initializes a requested number of execution environments so that they are prepared to respond immediately to your function's invocations. 

 

Storage

Lambda storage is classed as ‘ephemeral’ or temporary storage. This means the data is stored only for as long as the application runs (temporary storage). Aws Lambda offers up to 10GB of file storage which is limited and might be a factor if you want more storage capacity, to get more storage capacity you can Amazon Elastic File Storage (EFS) which easily integrates with Lambda.

 

You are now aware of three of the most important factors to consider before deploying any applications on AWS Lambda. Make sure you consider them before deploying any applications to Lambda.

 

To work on real world hands on projects with AWS Lambda and other AWS services, you can enroll in our program

To begin your career in the cloud, check out this free workshop that we have put together that outlines the secrets to getting your first cloud job

 

Helping you accelerate your cloud career

Subscribe to receive actionable tips on how to develop your career in the cloud.

You're safe with me. I'll never spam you or sell your contact info.