In the previous section on migration planning, you explored and learned about the various avenues with which solutions architects such as yourself can help guide customers with their migration and modernization journey to the AWS cloud.
In this chapter, we continue along the same lines and explore how to effectively evaluate, design for, and manage costs on the AWS cloud. Throughout this chapter, we will be leveraging the same sample web application as before, exploring how costs are evaluated for each of the application’s components over time. You will also explore opportunities to right-size your workloads and, finally, dive deep into the AWS pricing models with the help of a few simple cost evaluation exercises.
The following main topics will be covered in this chapter:
The next section begins with a detailed review of the various pricing models offered by AWS services and how you can leverage them based on your needs.
When it comes to diving deep into the 200+ AWS services available, it is really important to take a moment and understand some of the underlying pricing options that accompany these services. The majority of the pricing can be classified into three main categories—on-demand, spot, and reserved; however, there are a few additional pricing options that all Solutions Architects should keep in mind when recommending a particular service for a particular task. In this section of the chapter, you will explore these pricing options in a bit more detail, starting with the compute layer.
Almost all organizations that leverage the cloud in some form or another also leverage one or more of its underlying compute capabilities to host and run workloads. In the case of AWS, these capabilities are provided by services such as Amazon EC2 instances, AWS Fargate, and AWS Lambda. For such compute services, AWS provides three primary pricing models to choose from. They are discussed in the following subsections.
On-Demand
This is by far the most commonly used pricing model and the easiest to implement. The on-demand mode simply allows customers to pay as per their resource consumption; the more you use, the more you pay, and if no resources are used or deployed, you essentially pay nothing. There are no long-term commitments or contractual obligations with this pricing model. Customers pay at a fixed rate of consumption, based on the resources that they have requisitioned on either an hourly or per-second basis. For example, an m5.large instance is priced at $0.102/hour in the Stockholm Region, which equates to $74.46/month.
Note
The prices mentioned anywhere in this chapter reflect the pricing at the time of writing, and AWS might change them at any time.
The on-demand pricing model is ideal for workloads that are required for a short duration or have an unpredictable, spiky workload that can require additional capacity at any given moment in time. One example is commerce websites during sales events. Retailers can experience unpredictable spikes in traffic during a sales event such as Black Friday or Cyber Monday. On-demand resources allow them to handle the increased load without over-provisioning throughout the year. Once the sale ends, they can scale down to normal levels. Similarly, streaming platforms that host sports events or conferences face varying demand, based on live events. An on-demand infrastructure allows them to scale up rapidly during live broadcasts and scale down afterward, optimizing costs.