AWS lets you manage your costs and optimize spend on an ongoing basis while building scalable, modern applications to meet your requirements. AWS offers a variety of pricing and service options that let you flexibly manage costs while maintaining the capacity and performance you need.
However, optimizing costs on AWS can be complex. I'll review several free tools provided by Amazon that can help, and three best practices that will help you match your spend on AWS to your organization's needs.
AWS Native Tools for Cost Optimization
Here are several free tools provided by AWS to help you lower your costs.
AWS Cost Explorer
AWS Cost Explorer has a streamlined interface that allows you to understand, manage, and visualize your AWS costs and usage as time goes on.
You can begin by creating custom reports that examine cost and usage information. You can analyze your data at a general level (for instance, total usage and costs overall accounts) or gain deeper insight into your cost and usage information to pinpoint trends, identify cost drivers and isolate anomalies.
AWS Pricing Calculator
AWS Pricing Calculator permits you to dive into AWS services and establish an approximate cost for your AWS usage. As you build a use case in the calculator, you can try out different service options, instance types and contract terms, and explore the calculations and price points behind your estimate. This helps you reach an informed decision about your use of AWS.
AWS Pricing Calculator is helpful both for organizations that have never used AWS and organizations that wish to expand and reorganize their AWS usage. You don't require any expertise with the cloud or AWS to use the AWS Pricing Calculator.
AWS Budget allows you to establish a "cost ceiling" according to a combination of tags, accounts, and resources. When your costs exceed your budget, you will get an alert to act before you surpass your limit.
You may also employ Cost and Usage Report, CloudTrail, S3 Analytics, and AWS CloudWatch to observe the public cloud for changes that could influence your costs.
3 Best Practices for AWS Cost Optimization
1. Select the Correct Pricing Models
Use AWS Reserved Instances (RI) to decrease costs on Amazon OpenSearch Service, Amazon EC2, Amazon Redshift, Amazon RDS, and Amazon ElastiCache. RIs offer discounts of up to 72% compared to regular on-demand costs.
Reserved Instances come in three formats - no upfront payments (NURI), partial up-front (PURI), or all up-front (AURI). You may wish to use the RI purchase recommendations offered in the AWS Cost Explorer. These directions are based on your actual Amazon service usage.
Alternatively, you can use Amazon Spot Instances to minimize EC2 costs by purchasing Amazon spare capacity, or use Savings Plans to minimize the combined cost of Fargate, EC2, and Lambda.
2. Match Capacity with Demand
Discover Amazon EC2 instances with low utilization and minimize costs by rightsizing or stopping instances. There are a few ways to automatically reduce the cost of underused instances:
- AWS Cost Explorer shows a report that lets you identify EC2 instances with low or no utilization.
- AWS Instance Scheduler lets you stop instances automatically at specific times, for example you can shut down instances that are not needed during the weekend.
- AWS Operations Conductor helps you automatically change the size of EC2 instances according to the recommendations statement from Cost Explorer.
- AWS Trusted Advisor lets you discover Amazon RDS instances with low utilization, and minimize costs by stopping them. For Redshift, you can isolate clusters that received no recent connections and have low CPU utilization, and pause them.
- Idle DB instances check - lets you find DB instances that have not experienced any connection over the previous seven days. To minimize costs, halt these DB instances.
- DynamoDB auto scaling - examine your DynamoDB utilization by monitoring two metrics, ConsumedWriteCapacityUnits and ConsumedReadCapacityUnits, via CloudWatch. Leverage the auto scaling feature to automatically scale your DynamoDB table according to load. Another option is to utilize the on-demand feature, which lets you pay per request, making it simpler to balance performance and costs.
3. Use Automated Processes to Identify Resource Waste
Here are a few ways to automatically eliminate wasted, unused resources:
- Discover Amazon EBS volumes that have low utilization and minimize cost by snapshotting and then deleting them. You can find volumes with low activity using Amazon's Trusted Advisor.
- Examine Amazon S3 usage and minimize costs by using lower-cost storage tiers. You can identify data that is less frequently used and move it to lower cost tiers, or use S3 analytics to automatically select the most optimal tier for your data.
- Delete load balancers not in use - if load balancers had less than 100 request over the past week, they are probably not needed. You can use Amazon Trusted Advisor to identify such unused load balancers and remove them.
In this article I explained the basics of AWS cost optimization and presented three best practices that may help you conserve costs in the Amazon cloud:
- Select the correct pricing models - in order to optimize costs, it is critical to match the pricing model to your workloads.
- Match capacity with demand - ensure that you have exactly enough cloud resources available to meet your current loads.
- Identify resource waste - automate detection of wasted or underutilized resources and eliminate or right-size them.
I hope this will be useful as you improve your strategy to manage and reduce AWS costs.