AWS Pricing Calculator

Most AWS Instructor Led Courses describe the use of the AWS Simple Monthly Calculator to estimate your monthly bill. This tool became known by some as the “Not So Simple Monthly Calculator”.

On June 30, 2020, AWS will no longer support the Simple Monthly Calculator and all users will be redirected to the newer “AWS Pricing Calculator”.

AWS Pricing Calculator was launched in 2018 and has been evolving to include more services.

“AWS Pricing Calculator lets you explore AWS services and create an estimate for the cost of your use cases on AWS. You can model your solutions before building them, explore the price points and calculations behind your estimate, and find the available instance types and contract terms that meet your needs.”

The tool simplifies the choices that you have to make, for example you can get a quick estimate for EC2 instances without delving too deeply into the different EC2 options.

To get started, I input some data loosely based on the “Large Web Application” sample that was supplied with the Simple Monthly Calculator. This is a Ruby on Rails application serving approximately 100,000 page views per month.

I added the following services and supplied data:

Route 53

  • 1 hosted zone
  • 1 million standard queries per month

Elastic Load Balancer

  • 1 Application Load Balancer
  • 10 GB processed bytes per month

EC2

  • 4 * m5.large, 1 year reserved term. No upfront payment EC2 Instance Savings Plans rate
  • 300 GB SSD gp2

RDS

  • 2 Node Aurora MySQL Compatible instance, db.r5.large. 1 year reserved term. No upfront payment.
  • 20 GB storage

S3

  • 30 GB S3 Standard storage.
  • 10000 PUT, COPY, POST, LIST requests
  • 100000 GET, SELECT requests
  • 300 GB Outbound Data Transfer

You can save and share your estimate as a URL. It will be saved for 3 years.

This is my saved URL

You can also export it as a csv:

 

EC2 Auto Scaling Purchasing Options

In the “Architecting on AWS” course there is a slide on Autoscaling Purchasing Options.

From the course notes:

Amazon EC2 Auto Scaling supports multiple purchasing options within the same Auto Scaling group (ASG). You can include Spot, On-Demand, and Reserved Instances (RIs) within a single ASG, allowing you to save up to 90% on compute costs.

The following walk through only takes a few minutes to try.

I keep it minimal to demonstrate the basic features and get started quickly, leaving you to try out the many further options.

In order to demonstrate using a mixture of On-Demand and Spot pricing, I will use a steady state Auto Scaling Group of 4:4:4, that is Minimum, Maximum and Desired all of 4. I aim to have a 50%/50% mix of On-Demand and Spot, that is 2 of each.

Another options is to have always have a certain number of On-Demand Base instances as part of the mix, but I will leave that Base number at zero.

When configuring Launch Templates and Auto Scaling Groups there is no reference to Reserved Instances. That part is automatically dealt with by matching your Reserved Instance choices, if any, with your actual running instances across the account, and then billing at the Reserved Instance price.

Everything that follows is done from the EC2 console.

This use case requires the use of a Launch Template.

Create a Launch Template. Give it a name. At a minimum, when the Launch Template will be used by an ASG, you must supply and AMI and Instance Type. I choose an AMZ Linux 2 AMI and t2.micro Instance Type.

Leave all rest as defaults. Note that expanding Advanced Details shows that you can request Spot instances here, but you must not tick this if the use case is to have a mix of On-Demand and Spot within and ASG.

Create an Auto Scaling Group and select the Launch Template. Select “Combine purchase options and instances”.

For Instance Distribution, clear “Use the default” and then choose “On-Demand Percentage” above base=50%, leaving everything else at default.

Choose to  Start with 4 instances. This is the desired number to start with. If you use Auto Scaling policies, then when scaling in and out, this the staring desired number and then it changes dynamically.

Select a subnet. In production it would be recommended to use more than one.

On the next screen, choose “No scaling policies”. To keep it simple, and to avoid needing to run some kind of simulated stress, we will keep it to a steady state group of 4 instances.

After a few seconds, you should see 4 instances launching.

We will want to verify the mix of On-Demand and Spot.

It is not possible to see the purchasing options from the instance details. Instead, you can go to EC2, Spot Requests to see 2 active spot requests, both fulfilled.

Alternatively, using CLI, the following will show details of the 2 Spot Instances.

aws ec2 describe-spot-instance-requests

If you select EC2, Spot Requests and click “Savings Summary” you can see A high-level summary of your savings across all of your running and recently terminated Spot Instances

To clean up:

Delete the ASG and Launch Configuration. The instances will be terminated, and in a few minutes you will see that the spot requests are closed.

The docs are here

Auto Scaling Groups with Multiple Instance Types and Purchase Options

and here

Introducing the capacity-optimized allocation strategy for Amazon EC2 Spot Instances

and for information about how the spot pricing model has changed recently

New Amazon EC2 Spot pricing model: Simplified purchasing without bidding and fewer interruptions