1. Rightsizing EC2 Instances
As we have already mentioned rightsizing, scheduling, and Reserved Instances/Savings Plans, let’s start with these three AWS cost optimization best practices. The purpose of rightsizing is to match instance sizes to their workloads.
2. Scheduling on/off times
It’s worth scheduling on/off times for non-production instances such as those used for developing, staging, testing, and QA, as you will save around 65% of running these instances if you apply an “on” schedule of 8.00 a.m. to 8.00 p.m. Monday to Friday.
3. Purchasing Reserved Instances and Savings Plans
Purchasing Reserved Instances is an easy way to reduce AWS costs. It can also be an easy way to increase AWS costs if you don’t utilise the Reserved Instance as much as you expected to, purchase the wrong type of Reserved Instance, or purchase a “standard” Reserved Instance only to find AWS prices fall over the term of your reservation by more than the reservation “saves”. Therefore, rather than suggest that purchasing Reserved Instances is one of the best practices for AWS cost optimisation.
4. Delete unattached EBS volumes
Returning to Elastic Block Storage (EBS), when you launch an EC2 instance, an EBS volume is attached to the instance to act as its local block storage. When you terminate the EC2 instance, the EBS volume is only deleted if you checked the “delete on termination” box when the instance was launched. If the box wasn’t checked, the EBS volume still exists and is contributing toward the monthly AWS bill.
5. Delete obsolete snapshots
Snapshots are an efficient way to back up data on an EBS volume to an S3 storage bucket because they only back up data that’s changed since the last snapshot to prevent duplications in the S3 bucket. Consequently, each snapshot contains all of the information needed to restore your data (from the moment when the snapshot was taken) to a new EBS volume.
6. Release unattached Elastic IP addresses
Elastic IP addresses are public IPv4 addresses from Amazon’s pool of IP addresses that are allocated to an instance so it can be reached via the Internet. Businesses are allowed a maximum of five Elastic IP addresses per account because Amazon doesn´t have an unlimited pool of IP addresses. However, they are free of change when attached to running service.
7. Upgrade instances to the latest generation
Due to Amazon Web Services’ wide array of products and services, there are frequent announcements about how products have been upgraded or features introduced to support specific services. With regards to AWS cost optimization best practices, the announcements to look out for are those relating to latest generation instances.
8. Purchase reserved nodes for Redshift and ElastiCache Services
One recent AWS announcement detailed how the discount program for Amazon Redshift and ElastiCache had changed. Previously, businesses could purchase advanced-payment “Heavy Utilization” discounts, but these have now changed to (almost) mirror Reserved Instance purchases for EC2 and RDS instances.
9. Terminate zombie assets
The term “zombie assets” is most often used to describe any unused asset contributing to the cost of operating in the AWS Cloud—many typical zombie assets have already been mentioned (unattached EBS volumes, obsolete snapshots, etc.). Other assets that fall into this category include components of instances that were activated when an instance failed to launch and unused Elastic Load Balancers.
10. Move infrequently-accessed data to lower cost tiers
Amazon Web Services currently offers six tiers of storage at different price points. Determining which storage tier is most suitable for data will depend on factors such as how often data is accessed (as retrieval fees apply to the lower tiers) and how quickly a business would need to retrieve data in the event of a disaster (as it may take hours to retrieve from a lower tier).