Amazon Web Services (AWS) offers several discounted pricing models that can help you optimize and reduce costs.
For example, spot instances offer the use of spare capacity for up to 90% off the on-demand price. Reserved instances and Saving Plans offer significant discounts in return for a long term commitment. The AWS Free Tier offers resources that are either always free or a limited amount of resources offered free of charge during a specific period of time.
In addition to these pricing models, you can implement several best practices that can help you better utilize resources, reduce waste, and conserve costs. We’ll cover seven of these techniques later in this article.
This is part of our series of articles about AWS costs.
In this article, you will learn about the following ways to save on AWS:
RIs offer significant discounts for customers willing to commit to using AWS resources for a long term duration of 1 or 3 years. This model lets you reserve instances and other services in advance and use them as needed.
You can pay upfront for the entire reserved capacity, pay partial upfront, or no upfront. Upfront payment provides the highest discount rate, but creates a larger financial risk for the customer.
There are several types of RIs on AWS. Standard RIs can be sold to 3rd parties on the AWS RI Marketplace. Convertible RIs require a commitment for a certain AWS region, and you can change the instance family at any time. However, note that convertible RIs cannot be sold in the AWS RI Marketplace, so you cannot offload them before the end of the term.
AWS offers massive discounts—up to 90%—by offering customers the option to use spare compute capacity. Spot instances are essentially compute resources that are sitting idle. To ensure these resources do not go to waste, AWS offers this capacity at a discounted rate.
Spot instances provide the deepest savings of any cloud pricing model. However, there are certain aspects that can significantly impact operations. In AWS, once a spot instance is required by on-demand or reserved customers, it is terminated with just a 2-minutes notice.
Saving Plans offer discounts for AWS customers committing to using AWS during a period of 1 or 3 years. This option lets you commit to a level of spend, and gain discounts on AWS compute services, including Amazon Elastic Compute Cloud (Amazon EC2), AWS Fargate, and AWS Lambda. Once you set this up, you’ll pay the regular hourly on-demand rate, and the discount will be applied at the billing stage after Amazon confirms your total spend.
The free tier offers the use of free AWS resources. Some are restricted to a limited number of months while others are always free. There are three main types of Free Tier offerings—short term trials, Always Free products, and the 12-month Free Tier.
The 12-months Free Tier lets you sample AWS resources for free. You can use these resources for a duration of 12 months or until you reach the maximum capacity allotted to this resource. Always Free products are available forever, at no cost, for all AWS accounts.
Short trial offerings come with a limited amount of time or a one-time limit, letting you sample the service and see if it is the right fit for your project. Once you exceed the limits you start paying the on-demand rate.
You can find all limitations and specifications for the AWS Free Tier on the official page.
To ensure billing is consistent across all organizational accounts and enable volume discounts, AWS treats all organization accounts as one account. Once accounts are consolidated, AWS combines usage data from across all accounts and then applies the relevant volume pricing tier.
The volume pricing tier provides a lower total price on consolidated resources, and then allocates a portion of the overall volume discount to each member account according to the usage of each account.
Learn more about volume discounts on Amazon's official page.
The following best practices can help you make more efficient use of AWS resources and conserve costs.
Here are several tools you can use to optimize resources and costs:
You can attach EBS volumes to EC2 instances—these are virtualized hard disks that provide high performance persistent storage. When an EC2 instance is terminated, this does not automatically delete the attached EBS volumes, unless you explicitly select the option to “delete on termination”, or the EBS volume is defined as the root volume of the instance.
It is very common to have “orphaned” EBS volumes in an AWS account, long after their parent EC2 instances were destroyed. Each EBS volume continues to accumulate storage costs.
It is important to gain visibility into unattached EBS volumes, understand if their data is necessary, and either delete them, reattach them to another volume, or move their data to a more cost effective storage option, such as S3.
You can leverage S3 Analytics to identify and analyze storage access patterns on an object data set—you can evaluate patterns over a duration of 30 days or more. This tool provides recommendations on where and how to leverage the S3 Infrequently-Accessed (S3 IA) tier to reduce your storage costs.
Two other options to leverage lower cost storage tiers:
EC2 autoscaling groups can help you shrink or expand EC2 fleets according to demand. You can review scaling activities using the describe-scaling-activity CLI command. An analysis of the results should help you see if a scaling policy should be tuned. Additionally, you should review your settings to check if you can reduce the minimum capacity, and serve end user requests using a smaller fleet.
When purchasing RIs, you pay for resources you estimate you will need in the future. In some cases, you might end up with idle resources. To ensure you make use of your investment, you can relocate the instances to a new project or another application that is in need of this capacity. Additionally, you can repurpose the RIs for existing workloads currently running on expensive on-demand resources. Alternatively, you can sell idle Standard RIs on the AWS marketplace.
After you terminate an EC2 instance, EBS volumes may or may not be deleted. However, your snapshots remain and continue accumulating charges, which can add up to a large sum. While backups are typically incremental, the first snapshot made is of an entire volume, and can have substantial costs over time.
Regular snapshots taken over a long period of time may need as much capacity as the first snapshot. Even if you keep your snapshots in cheap S3 storage, it can still accumulate into a large expense. To save on costs, consider deleting the first snapshot of the entire volume, and other snapshots as soon as they are no longer required.
If you use Amazon DynamoDB as part of your Amazon deployment, set up metrics and monitor consumption to ensure it does not accumulate unnecessary costs. You can use CloudWatch metrics like ConsumedWriteCapacityUnits and ConsumedReadCapacityUnits to monitor DynamoDB usage.
Once you have a monitoring system in place, you can analyze the data, gain insights into resource consumption, and optimize utilization and costs. You can leverage autoscaling to scale DynamoDB to the appropriate size. Be sure to enable this feature on all existing tables.
Alternatively, you can try the on-demand feature, which allows you to pay for DynamoDB on a pay-per-request basis for read and write requests.
While AWS offers Savings Plans, RIs and spot instances for reducing EC2 cost, these all have inherent challenges:
Spot by NetApp addresses these challenges, allowing you to reliably use spot instances for production and mission-critical workloads as well as enjoy the long-term pricing of RIs without the risks of long-term commitment.
Key features of Spot by NetApp’s cloud financial management suite include:
for up to 20 instances