Last week our own Kassandra Perch and Chris Munns from AWS teamed up and held a webinar to answer questions from the community about serverless and AWS Lambda.

I’ve collected a few of my favorite questions and answers from the video for your easy scanning, but be sure to check out the full video for tons of great questions and answers!

How do cold starts affect the performance of my AWS Lambda application, and how can I mitigate that?

Jump to this question in the video

Cold starts happen when a new compute resources is prepared by AWS behind the scenes to handle incoming events for Lambda functions. Cold starts typically happen when you first create a Lambda function, or when functions are scaling behind the scenes.

Chris goes on to state that cold starts affect less than .25% of all invocations on AWS Lambda.

Ways to mitigate cold starts:

Keep dependencies to a minimum, loading large dependencies can contribute to slower cold starts.

Break apart large/complex functions into smaller functions, which can reduce the amount of code and dependencies.

If you’re not accessing resources inside a VPC, do not use VPC for your Lambda functions as it can add unnecessary latency. AWS takes care of securing Lambda functions for you, so VPC is only necessary for reaching other VPC resources that you control.

For more on cold starts check out this article which dives into the topic in more detail.

How do Blue/Green deployments help my serverless application?

Jump to this question in the video

AWS Lambda pre-announced an upcoming feature supporting traffic shifting and aliases for AWS Lambda. This will allow you to configure two or more versions of a function, and set a weight to that function. For example, you can send 5% of traffic to version A, and 95% of traffic to version B of your function. You can also modify the flow of traffic on the fly.

This can help you test new versions of code, and allow you to rollback to a previous version if there’s an issue detected.

How can Lambda be used for e-commerce applications?

Jump to this question in the video

AWS Lambda is now a PCI certified service, so it can support credit card processing and other forms of payment processing. In addition, Lambda is often used for web application backends and CRUD interfaces, as well as microservices processing transactions in the backend.

Nordstrom also released an open source reference architecture of a 100% serverless online retail application called Hello Retail.

Is it possible that the same container will handle two concurrent requests at the same time, or are they absolutely different?

Jump to this question in the video

There is no concurrency at the container level, so every concurrent request will get its own container.

Are there best practices for tracking events through my serverless application?

Jump to this question in the video

IOpipe is specifically made for this purpose. It provides a detailed view of what’s going on inside a specific Lambda invocation, and can help trace events through multiple functions and services.

AWS X-ray is another great service which can provide insights into events traveling through AWS services, and supports Lambda.