Leveraging AWS Compute Optimizer To Reduce Cloud Costs

Ensure your cloud resources are constantly optimized and right-sized to reduce your monthly costs.

AWS Compute Optimizer - The Cloud Economist

Read on Beehiiv | Nov 17th, 2024

Welcome back to another edition of The Cloud Economist.

Last week I discussed some strategies and tips for reducing costs with API Gateway, including caching, choosing the right API type, using request throttling, using CloudFront, and more.

If you missed that you can read it here.

In the question of the week, I asked:

How does caching at different levels in API Gateway help reduce costs, and what metrics should you monitor to fine-tune caching settings?

Answer:

Enabling caching in API Gateway reduces backend calls by storing responses and serving them for repeated requests. This lowers both API Gateway and Lambda invocation costs.

Caching is ideal for endpoints where data doesn’t change frequently, like displaying a list of products or services. To optimize caching, monitor the cache hit rate in CloudWatch. A high cache hit rate = good caching, low hit rate = TTL is too short. Adjust the TTL and cache size based on these metrics to balance cache costs against backend savings.

This week we’re going to see various ways to use AWS Compute Optimizer to help us automate right-sizing monitoring and automatically be able to reduce costs.

What is AWS Compute Optimizer? - It is a service that analyzes your AWS resources’ usage and provides recommendations to improve performance, reduce costs, and optimize resource configurations.

Here are the best articles I’ve found on cloud cost savings this week, summarized.

The article shares 5 ways Compute Optimizer helps fine-tune your resources:

  1. Data Collection: AWS Compute Optimizer collects utilization data from sources like CloudWatch, AWS Config, and CloudTrail.

  2. Machine Learning Analysis: It uses machine learning to analyze collected data, requiring 12–60 hours of metrics to generate accurate optimization recommendations.

  3. Optimization Recommendations: provides actionable suggestions for EC2, EBS, Auto Scaling groups, Lambda, and ECS on Fargate to improve performance and reduce costs.

  4. Instance-Type Suggestions: Identifies under-provisioned or over-provisioned EC2 instances and compares current configurations with up to three optimized alternatives.

  5. Recommendation Implementation: Lets you prioritize and implement suggested optimizations using AWS tools like Systems Manager, Auto Scaling, and CLI, then monitor performance for results.

Article 2

AWS Compute Optimizer can estimate Amazon EC2 monthly savings under different pricing models.

  • Savings Plans and Reserved Instances: Calculates savings after applying discounts from these plans

  • On-Demand: Shows savings when switching to recommended instances using On-Demand pricing

  • Savings Opportunity (%): Indicates the percentage difference in cost between current and recommended instance types

By analyzing these estimates, you can then effectively decide which pricing model and instance types will offer the most significant savings for your specific use case.

One Tip on Cloud Cost Savings

Most cloud users’ dominant monthly costs is usually Amazon EC2. Oftentimes, some instances are either underutilized or not receiving much traffic.

With Compute Optimizer, you can cross-check recommendations to find EC2 instances (or EBS volumes) that are barely used or not receiving much traffic and right-size or terminate them.

This Week’s Question

How can you leverage AWS Compute Optimizer’s “performance risk” metrics to identify opportunities for downsizing without sacrificing SLA requirements?

Check back here next week for the answer!

Until next week.

The Cloud Economist