Chapter 9. Cost of Serverless Operation
We are prone to overestimate how much we understand about the world and to underestimate the role of chance in events.
Daniel Kahneman, Thinking, Fast and Slow
One of the key innovations that serverless has brought to software operations in the cloud is the pay-as-you-go pricing model. In this chapter, you will explore the pay-per-use model that is characteristic of the predominant serverless services, including AWS Lambda, Amazon DynamoDB, and AWS Step Functions. You will learn about the intrinsic link between your monthly bill and the efficiency of your serverless architecture and how to estimate the cost of your architecture before implementing and releasing it. You will also be equipped with a comprehensive set of best practices when it comes to monitoring and reducing the cost of your serverless application over time.
In Chapter 8, you saw the importance of designing and operating a serverless application with service quotas and pricing in mind. Next, you will see how to use these quotas and prices to effectively estimate production costs to ensure your bill does not spike disproportionately to your traffic. Of course, with the pay-per-use model, you should expect costs to rise and fall with the volume of requests sent to your application. However, there have been plenty of instances of architectural inefficiencies causing teams to experience unexpectedly high costs.
This is why the serverless pay-per-use model should be approached ...
Get Serverless Development on AWS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.