AWS Lambda Pricing: Low, But Unpredictable

Today’s entry into our exploration of public cloud prices focuses on AWS Lambda pricing.

Low costs are often cited as a benefit of using serverless. A recent survey showed that companies saved an average of 4 developer workdays per month by adopting serverless, and 21% of companies reported cost reduction as a main benefit. But why aren’t 100% of companies reporting cost savings?

In this article, we’ll take a look at the Lambda pricing model, and some things you need to keep in mind when estimating costs for serverless infrastructure.

How AWS Lambda Pricing Works

Core Pricing

AWS Lambda pricing is based on what you use. There are two major factors that contribute to the calculation of “what you use”:

  • Requests — Lambda counts a request each time it starts executing in response to an event notification or invoke call. Each request costs $0.0000002.

Free Tier

There is a free tier available to all Lambda users — and note that this is unrelated to your regular AWS free tier usage. Every user gets 1 million requests per month and 400,000 GB-Seconds per month, for free.

Additional Charges

In addition to requests and duration, you will also be charged for additional AWS services used or data transfers — regardless of whether you’re using Lambda’s free tier. For many applications, API requests and data transfers will cost significantly more than the AWS Lambda core pricing.

Why AWS Lambda Pricing is So Confusing

Ultimately, Lambda pricing is confusing and hard to predict. Here’s why:

  • Granularity — the fact that cost is per each function execution makes it difficult to estimate compared to server-based pricing models. Thinking in terms of iterations of a microservices script requires some mental gymnastics.

Of course, there are several AWS Lambda pricing calculators out there to help estimate costs — ranging from the simpler that include only the number of executions, memory allocation, and average duration (examples from Dashbirdand A Cloud Guru) to those incorporating language, activity patterns, and EC2 comparisons from the cheekily named servers.lol.

AWS Lambda Costs Are Just One Factor

There are plenty of benefits to serverless, from low latency to scalability to simple deployment. However, alongside vendor lock-in, applications with long or variable execution times, and control over application performance, cost is another reason why serverless may not replace traditional servers for all situations.

Originally published at www.parkmycloud.com on May 20, 2019.

CEO of ParkMyCloud