Reduce AWS Lambda costs with these tips

Run code without thinking about servers

AWS Lambda cost saving tips

Optimize your AWS Lambda costs with these tips

Choose Memory Wisely

Rightsizing your Lambda function is essential. You must find a good balance between CPU and memory usage. You can use AWS Lambda Power Tuning profiler or AWS Compute Optimizer to find a sweet spot for your function. Higher memory functions might be more expensive, but they might also finish their work faster.

Utilize Savings Plan

With the AWS Savings Plan you can reduce your EC2, Lambda and ECS Fargate costs. Ideally you would pick the no-upfront savings plan for a longer term. If you are using AWS organizations, make sure to share the savings plan. Purchase saving plans incrementally so you can stack them and utilize them fully.

Analyze Your Usecase

Depending on your use-case Lambda might be great if you are running a fully event driven architecture, but it can get expensive at scale. If you have a fixed and consistent workload (for example a web server with high load, with a lot of idle time in requests) it might be more cost effective being served by Fargate.

Service information & pricing

About AWS Lambda

About AWS Lambda

AWS Lambda is a serverless compute service that allows code execution from an uploaded .zip or container image at any scale. Pay only for used compute time. Ideal for various applications like file/stream processing and web/IoT backends. Due to its serverless nature it is important to optimize your cold starts. For instance, placing database connection handlers outside the function handler code.

Learn more

AWS Lambda pricing

AWS Lambda pricing depends on function execution duration, number requests made, memory size allocated to the function, and the aggregate monthly duration of functions on the same architecture and region. Ephemeral storage cost varies with allocated amount and execution duration. To get a better price performance for your Lambda functions you might consider using Graviton architecture.

Learn more