In Part 1 of our Complete AWS Lambda Handbook for Beginners, we gave a refresher on the fundamentals of AWS Lambda and what is AWS Lambda. In this post, we’ll look at AWS Lambda pricing, some interesting Lambda facts and examples of great AWS Lambda use cases in your serverless application.

AWS Lambda Pricing

With AWS Lambda, you only pay for what you use, factoring in the number of requests and duration of your code. Lambda considers;

  • a request to be the time it starts executing in response to a trigger, such as an event notification or an invocation volume.
  • the duration of the code from the moment your code begins executing until it returns or is terminated.

AWS Lambda offers a Free Tier, which includes 1 million requests per month, and 400,000 GB-seconds of compute time on a monthly basis. The Lambda Free Tier doesn’t expire automatically at the end of the annual AWS Free Tier term, meaning it is available indefinitely to both existing and new AWS customers.

The Requests Tier includes 1 million free requests per month. After they’ve been spent, this tier will cost $0.20 per 1 million requests or $0.0000002 per a single request.

The Duration Tier comes free with 400,000 GB-seconds per month, which is up to 3.2 million seconds of computing time free of charge. After they’ve been spent, the tier costs will go to $0.00001667 per every GB-second used. The price is based upon the amount of memory allocated to the user’s function.

To calculate the price you’d be paying, you can use this AWS Lambda cost calculator. The calculator will help allocate costs and set budgets for AWS Lambda services based on your unique usage.

To see some cost examples and how the smaller print adds up to additional cost, have a look at this post explaining AWS Lambda pricing model with examples.

Lambda functions can get time-consuming and costly if you don’t prioritize its optimization. One essential practice is prioritizing the functions that are contributing the most to the overall AWS bill.

It’s understandable that many will overlook this obvious practice since AWS does not provide much granularity into our cloud spending at first glance. Specialized monitoring services can take care of that. With Dashbird, for instance, you can see your spending on a per-function basis, aggregated by time period and receive Well-Architected insights customized based on your data to further improve your applications reliability, scalability and cost-efficiency. Dashbird periodically polls your AWS account for data. All the data we receive is encrypted and stored safely. Get your free account to test it out or find out more how to reduce AWS Lambda cost.

#microservices #aws #cloud computing #serverless #aws lambda

The Complete AWS Lambda Handbook for Beginners (Part 2)
1.20 GEEK