Understanding Serverless Cost Models – Cost of Serverless Operation

Amazon DynamoDB pricing AWS Certification Exam Microsoft Exams Serverless Cost Estimation Software Architecture Total Cost of Ownership in the Cloud

Understanding Serverless Cost Models

When evaluating your options for hosting and operating your software, cost is usu‐ ally a key consideration. In recent years, serverless has emerged as a sound choice for teams and organizations looking for simplicity and cost-efficiency. With the com‐ bination of managed services and a pay-per-use pricing model, there is huge potential for serverless to allow you to focus on building software to meet your business and user needs without breaking the bank.

Serverless allows teams to scale usage of their applications from zero, paying very little or nothing at all, to peak demand, with rising costs (see Figure 9-1).

Figure 9-1. On-demand usage versus cost

There are three core contributing factors to the cost of running a workload on AWS:

Compute

The cost of compute will depend on the managed service you choose, but the crucial aspect of serverless compute is that you will only pay for what you use. We’ll take a closer look at the pricing models for AWS Lambda and AWS Step Functions in “Compute Costs” on page 383.

Storage

The cost of storing data is based on the amount of data written to and read from your chosen data store. You will also be charged for storing the data over time. Additional charges may be incurred for encryption and replication, depending on your architecture. Keeping storage costs low is all about optimizing your data model and access patterns, using compression strategies to reduce the space your data consumes, and efficient usage of caches. Keep in mind that you will likely store both application state and operational data, such as traces, logs, and metrics. You will see examples of the pricing models for two popular storage options, Amazon S3 and Amazon DynamoDB, in “Storage Costs” on page 385.

Outbound data transfer

The cost of outbound data transfer is mostly associated with sending data outside of containers or managed services running on the EC2 service to the public internet. For serverless applications, outbound data transfer costs could include sending CloudWatch metrics to a third-party application monitoring platform, leveraging S3 object replication, or using DynamoDB global tables. For more information and examples see the AWS blog post “Overview of Data Transfer Costs for Common Architectures”.

While you will incur costs for outbound data transfer, for a serverless application, your costs will mostly concentrate around compute and storage. We’ll look at the pricing models for the primary serverless compute and storage services shortly, but first, let’s go beyond the monthly bill for a moment and take a broader look at cost.

Leave a Reply

Your email address will not be published. Required fields are marked *