30 days

How to Reduce Your AWS Cloud Costs With Infracost in 30 Days

Let’s face it: the cloud can become unexpectedly expensive. But it doesn’t have to be if you know how to reduce costs. Here’s a guide to help you optimize cloud costs in 30 days or less. The savings strategies mentioned in this guide are quick to implement and should not impact your application performance; thus, they are much more likely to be actioned by engineers vs. activities such as rightsizing.

Create an Optimization Plan and Start with Quick Wins

Before diving headlong into cost-cutting tactics, create a solid cloud cost optimization plan. Map out your existing cloud environment, then set achievable targets for cost reduction. Start with the low-hanging fruits to achieve quick wins and show the company that cost optimization practices pay dividends.

Quick Wins:

  • Remove unused and idle resources.
  • Update previous generation EC2, RDS, OpenSearch, and ElastiCache instance types to the latest generation ones.
  • Buy reserved instances and savings plans.
  • Update previous generation volume types such as gp2 or io1 to the latest generation ones.
  • Create lifecycle policies for S3 object storage buckets.
  • Set retention policies for CloudWatch log groups.

Remove Unused and Idle Resources

It’s easy to launch resources in the cloud to test something and forget about them afterward; other times, resources are left abandoned as applications are decommissioned, teams are reorganized, and people are laid off.

To find idle resources and avoid paying for unused cloud capacity, start using AWS Cost Explorer to understand the cost of your top AWS services, which helps focus your efforts. AWS Trusted Advisor is a critical tool in this process; it highlights idle resources and suggests potential savings opportunities from removing stopped instances, idle databases and load balancers, unassociated elastic IP addresses, and unattached EBS volumes. Old EBS snapshots are a common source of high storage costs; review them to see which can be bulk-deleted to reduce cloud bills.

Additionally, leverage AWS CloudWatch metrics to identify or verify resources with consistently low utilization patterns. Once identified, create a decommissioning plan, ensure proper backup and migration of critical data, and terminate the identified resources. Regularly review and iterate on this process to avoid paying unnecessary costs from unused resources.

AWS Trusted Advisor highlights idle and unused resources
AWS Trusted Advisor highlights idle and unused resources

Update Previous Generation Instance Types

AWS services such as EC2, RDS, OpenSearch, and ElastiCache enable engineers to select from hundreds of instance types. AWS regularly releases new instance types, but many organizations are unaware of these and the CPU utilization improvement compared with previous generation instance types. Newer instances often deliver improved capabilities, such as enhanced computing power, advanced networking, and superior storage options, usually with similar or better cloud pricing.

For example:

  • EC2 “m3” vs. “m5” instances: Upgrade to the Amazon EC2 m5 instance family to get a higher performing CPU with support for AVX-512 instructions, up to 384 GiB of RAM, and up to 25 Gbps of networking bandwidth, all at a lower price point than previous generation instances. For example, an m3.large instance with 7.5 GiB of memory and 2 vCPUs has a monthly cost of $97. A m5.large instance with 8 GiB of memory and 2 vCPUs costs just $70. That’s a 27% saving for a more performant machine.
  • RDS “m3” vs. “m5” instances: You get an upgraded Intel Xeon Platinum 8000 series (Skylake-SP) that can deliver up to a 20% improvement in price/performance compared to prior generations. For example, a db.m3.xlarge instance with 14 GiB of memory and 3 vCPUs has a monthly cost of $270. Whereas a db.m5.xlarge with 16 GiB of memory and 4 vCPUs has a monthly cost of $249. That’s a 7% cost saving for a more performant instance.

Infracost scans all of your cloud infrastructure code repositories and shows a report of the instances that need to be updated so you can take advantage of this cloud cost optimization technique. You can download a CSV of these recommendations to form an upgrade plan. Once engineers make the changes, Infracost tracks the changes, calculates the cost savings, and updates the recommendations to have a real-time chart of how well you follow this FinOps best practice.

Infracost shows which EC2, RDS, ElastiCache and OpenSearch instances need to be updated to latest generation instance types
Infracost shows which EC2, RDS, ElastiCache and OpenSearch instances need to be updated to latest generation instance types

Buy Reserved Instances and Savings Plans

After you’ve removed unused capacity and upgraded previous generation instance types, you should consider the procurement of Reserved Instances (RIs) and Savings Plans in AWS. This key cloud cost optimization strategy usually results in significant savings.

These commitment-based pricing models offer a substantial discount compared to on-demand instances, providing a predictable and controlled expenditure structure. By committing to a specific amount of computing capacity over a one- or three-year term, organizations can capitalize on substantial cloud savings, making this an important step to reduce the costs of this cloud provider. Other public cloud providers offer similar discounting models. RIs and Savings Plans are advantageous for stable and predictable workloads, ensuring a consistent and favorable pricing model for your cloud investments.

AWS Trusted Advisor provides RI recommendations for cloud services, including EC2, RDS, ElastiCache, OpenSearch, Redshift, and Savings Plan recommendations for EC2, Fargate, and Lambda.

Update Previous Generation Volume Types

Since releasing EBS, AWS has introduced four new volume types, each representing a significant advancement in storage capabilities. These include gp2, gp3, io1, and io2, each tailored to specific performance and cost optimization needs. The evolution from gp2 to gp3 showcases improvements in baseline performance and adaptability, while the transition from io1 to io2 signifies advancements in durability and IOPS capabilities.

Consider the following cloud storage recommendations to reduce your cloud spend on this cloud provider:

  • AWS EBS gp2 to gp3: gp3 volumes are the latest generation of general-purpose SSD-based EBS volumes that enable you to provision performance independent of storage capacity while providing up to 20% lower price per GB than existing gp2 volumes. With gp3 volumes, you can scale IOPS (input/output operations per second) and throughput without providing additional block storage capacity. This means you only pay for the storage you need.
  • AWS EBS io1/io2 to gp3: io1 and io2 volume types that need less than 16K IOPS, and less than 1,000 MB/s throughput, and don’t use Multi-Attach should be switched to gp3 as that is at least 2X cheaper. For example, a gp3 volume with 16TB storage, 16K IOPS, and 1,000 MB/s throughput costs $1.4K/month vs. $3K/month on io1 or io2.
  • AWS EBS io1 to io2: This should be considered for io1 volumes that cannot be upgraded to gp3. io2 is a newer generation of io1 volumes with the same price but 100X durability of 99.999% and 10X higher IOPS-to-storage ratio of 500 IOPS for every provisioned GB.

Like previous generation instance types, Infracost shows you a report of the volumes that need to be updated so that you can take advantage of this cloud cost optimization method.

Infracost shows which volumes need to be updated
Infracost shows which volumes need to be updated

Create Lifecycle Policies for S3

AWS S3, often accumulates vast amounts of data over time. Lifecycle policies enable the automated management of this data by defining rules for transitioning or expiring objects based on their age or storage class. By configuring lifecycle policies, organizations can seamlessly transition infrequently accessed data to lower-cost storage tiers or even delete outdated information, ensuring that storage costs are aligned with actual usage patterns.

Amazon S3 Intelligent Tiering automatically optimizes cloud costs by moving objects between two access tiers: frequent and infrequent. This storage class uses machine learning to analyze changing access patterns and adjust the tiers, thus helping you save money.

Infracost shows which S3 buckets do not have a lifecycle or intelligent tiering policy. You can review these and define policies that remove or move objects to a less expensive S3 storage class. For example, a bucket storing 1TB of data in a standard storage class would have a monthly cost of $23. If the same data were moved to the Glacier Flexible Retrieval storage class, it would have a monthly cost of just $3.60. That’s an 84% cost saving!

Set Retention Policies for CloudWatch

CloudWatch is a key cloud service for monitoring and logging in AWS. Over time, it often accumulates vast amounts of data from various cloud resources and cloud deployments. Implementing retention policies ensures that this data is systematically managed and retained for the necessary duration, aligning cloud spend with actual business needs.

By defining specific rules for data retention, organizations can strike a balance between compliance requirements and cost-effectiveness. Retaining data only as long as needed optimizes cloud spend and streamlines the analysis of relevant historical data.

Use a retention policy to avoid retaining logs indefinitely and accumulating a high cloud cost. For example, if an application generates 5GB of logs daily, you’d store 1.8TB of logs in a year without retention. In the AWS US East (N. Virginia) region, where this costs $0.03 per GB per month, you’ll incur a cumulative yearly cost of ~$802. This cost will continually grow as more logs are added.

Infracost scans all of your CloudWatch log groups and shows the ones that do not have a retention policy. Infracost shows how easy it is to fix this and reduce your cloud spend by setting the number of days that logs should be retained.

Infracost shows which code repos need to be updated to add CloudWatch retention policies
Infracost shows which code repos need to be updated to add CloudWatch retention policies

Reducing Cloud Bills May Seem Daunting, But It’s Entirely Doable Within 30 Days

It involves understanding your cloud bill, reviewing the cloud cost optimization recommendations in this article, and working with engineers to implement the changes to cloud resources across all cloud environments.

Infracost makes it significantly easier to reduce cloud costs by showing engineering teams recommendations on exactly which code repos and files need to be updated to lower cloud bills.

So, put these best practices into action. Start your 30-day journey today and save money!


Frequently Asked Questions (FAQs)

An optimization plan is a strategic approach to reducing cloud costs. It identifies areas for improvement and outlines the steps to achieve those cost savings. It usually starts with quick wins for immediate impact while laying the groundwork for long-term cost optimization.

Your cloud bill provides a detailed breakdown of your cloud usage and costs. Understanding each line item, hidden fees, and the terms associated with each cloud resource is crucial to managing costs effectively across your cloud environments. The AWS cloud provider has a native tool called Cost Explorer that helps you understand your cloud bills.

Reserved Instances (RIs) and Savings Plans are cost-saving options from AWS where users commit to specific instance usage for one or three years in exchange for discounted rates.

Several tools, like Infracost, help you optimize your cloud costs. These tools provide actionable insights into which code repos need to be updated to implement the optimizations, thus making it easy for engineers to take action.

Review your cloud usage and resources to find the top services across your cloud environment. Cloud cost management tools such as AWS Cost Explorer provide this visibility, so you start optimizing cloud costs by focusing on those services. Often, EC2, EBS, and S3 are in this list, hence the recommendations in this article apply to most companies.

Other cloud providers, such as Microsoft Azure and Google Cloud Platform, have native cloud cost management tools to help you reduce cloud costs.

Similar Posts