The holy grail of AWS cost optimization

Do you need help optimizing your AWS portfolio? Learn how to optimize your cloud costs and maximize your AWS savings plans

2023.03.06Roman Schneider

Discover a broad range of cost-saving opportunities

In this blog port, we discuss strategies and best practices for cost optimization on Amazon Web Services and how they relate to sustainability. From identifying and optimizing underutilized resources to utilizing cost-saving features such as Reserved Instances and Auto Scaling, we explore how you can keep your costs under control and contribute to a more sustainable future in the cloud.

How to prepare your cloud environment for cost optimization

Woman in a business meeting

The default billing settings are usually sufficient if you manage a single AWS account. However, if you manage multiple accounts, there is no way around the AWS Organizations. The AWS Organizations allows you to consolidate billing data and payments across multiple accounts and set up budgets and cost alerts to manage costs. The service also enables the management of multiple accounts and helps enforce governance, security, and compliance standards.

The AWS Consolidated Billing feature

The Consolidated Billing feature in AWS Organizations provides the following benefits:

  • Centralized billing: With Consolidated Billing, you can view and pay for charges across all your accounts from one paying account, making it easier to manage your costs and track usage across your organization.
  • Cost allocation: You can allocate costs from member accounts to the payer account to track and allocate costs to specific projects or departments.
  • Savings on usage: You can take advantage of volume pricing discounts across all your accounts. This can help you save money on your AWS usage.
  • Better cost visibility: Consolidated Billing provides a detailed breakdown of costs for each member account, so you can see how costs are incurred across your organization.
  • Cost optimization: With Consolidated Billing, you can set up budgets and alerts to help you manage costs and optimize your use of AWS resources.

Usage commitment with Savings Plans

AWS Savings Plans is a cost-saving feature that allows you to reduce your AWS hourly rate by committing to a constant amount of use over a set time. There are three types of AWS Saving Plans:

  • Compute Savings Plans: Save money on Amazon EC2 (Elastic Compute Cloud) and AWS Fargate by committing to a constant amount of use  (measured in $/hour) over a specified period (one or three years).
  • EC2 Instance Savings Plans: Save money on your Amazon EC2 use by committing to a consistent number of instances or a consistent amount of vCPU (virtual central processing unit) use over a period of time (one or three years).
  • SageMaker Savings Plans: Save money on Amazon SageMaker by committing to a consistent amount of use (measured in $/hour) over a set time (one or three years).

AWS Cost Management Console


If you commit to consistent use or a number of instances, you can take advantage of a lower hourly rate. This can help you reduce your expenditure, especially if you have predictable use patterns, or you can shift some of your workloads to lower-cost instances.

Using the AWS Cost Management Console, you can better understand your savings plans coverage with the coverage report. You can also identify any areas where you may need to purchase additional savings plans to optimize your costs fully.

The following diagram demonstrates an example of an organization where 44% of AWS Resources are covered by Saving Plans (note: only EC2, Lambda, Fargate, and SageMaker can be covered by Saving Plans). 56% are provisioned and billed with theon-demand rates by Amazon Web Services.

Compare payment options

Each Amazon Web Services payment option has its advantages and trade-offs:

  • All Upfront: You pay the entire cost of the Reserved Instance upfront in exchange for the largest discount on the hourly rate. This option is best for users with a clear and consistent pattern, and their use is predictable for the entire duration of the Reserved Instance term.
  • Partial Upfront: You pay a portion of the cost upfront and spread the remaining cost over the Reserved Instance term. This option offers a lower discount on the hourly use rate compared to the All Upfront option but provides more flexibility in terms of cash flow.
  • No Upfront: You do not pay anything upfront and spread the cost over the Reserved Instance term. This option offers the lowest discount on the hourly use rate but provides the most flexibility in terms of cash flow.

A predictable cost model

It's important to note that you are still committed to using the reserved capacity for the entire term, regardless of your chosen payment option. You will be billed for the total cost of the Reserved Instance, irrespective of whether you use it or not. Reserved Instances and Savings Plans provide a more predictable cost model, help you budget more effectively, and make more informed decisions about your infrastructure needs. To further reduce your costs, you can combine both. Use Reserved Instances to save money on specific instance types and availability zones, and use Savings Plans to save money on your overall use.

AWS cost optimization with Auto Scaling and right-sizing

Combining AWS Auto Scaling and right-sizing ensures that you are using resources appropriately. This helps you optimize your AWS costs, improve performance, and reduce over-provisioning. 

  • AWS Auto Scaling allows you to automatically increase or decrease the resources you consume based on a workload’s demand. You are only paying for what you need when you need it. When resources are not in use, they still incur costs, such as storage and data transfer charges. AWS Auto Scaling ensures that resources are only running when needed, reducing idle resources and associated costs.
  • Right-sizing means choosing the right instance type - grouped in an instance family - and size for your workload. A smaller instance may be unable to handle a high workload, and a larger instance may waste resources. The AWS Trusted Advisor provides features such as the Right Sizing tool. This tool helps you to identify underutilized EC2 and  Amazon RDS DB instances and recommends appropriate instance types based on your use patterns.

Control your expenditure

AWS Auto Scaling and right-sizing are particularly useful for development and test environments, where resources may not be in use outside of regular business hours or during weekends and holidays. By automatically shutting down resources when they are not needed, you can avoid unnecessary charges for running those resources. This can help you optimize your costs and ensure that you are only paying for the resources that you need. Amazon Web Services provides various solutions to execute the automatic shutdown of resources, such as the AWS Instance Scheduler and the Amazon EventBridge Scheduler.

Upgrade from gp2 to gp3 volumes

In addition to lower costs, upgrading from gp2 to gp3 on Amazon Web Services provides several benefits, including higher storage limits and performance. Gp3 also offers more options for IOPS and throughput, allowing more flexibility in choosing the right storage solution for your workload. Furthermore, gp3 volumes support a feature called bursting, which enables a higher IOPS rate for short periods when workloads require it. Bursting ensures that storage performance limitations do not throttle your workloads. The burstable performance of gp3 enables savings by reducing the need to over-provision storage. In general, gp3 offers 20 percent lower costs than gp2 on a per-GB basis. The improved performance and additional features of gp3 result in cost savings for workloads, particularly those that require high IOPS or throughput. Take a look at Amazon’s migration cost calculator to identify how much you can save by migrating from gp2 to gp3.

Move to Graviton EC2 instances

Graviton2 instances are based on 7nm process technology and are designed to be energy-efficient, which can help to reduce costs associated with power and cooling. Graviton2 is eminently suitable for workloads such as Linux, RDS, EMR, AWS Lambda, and Amazon Aurora. It has the advantage of providing significantly better performance and reducing costs by up to 50 percent. It's worth mentioning that Graviton2 instances are only available in certain regions and availability zones and may not support all the features and configurations of x86 instances. So, it's essential to check availability and compatibility before deciding.

Consider EC2 Spot Instances

EC2 Spot Instances allow you to bid on spare Amazon EC2 capacity at a discounted rate. They are available at a significant discount compared to on-demand instances. You can save up to 90 percent compared to on-demand pricing. They can be an excellent option for workloads that tolerate interruptions and have flexible start and end times.

Optimize your code performance

Your code performance impacts the underlying compute resource, so you pay extra for every unnecessary code snippet. There are different ways to reduce your running time and increase performance. 

  1. Profiling: A profiler identifies the specific areas of your code causing performance bottlenecks. Profilers can help you identify slow-running sections of code and pinpoint the lines of code causing issues.
  2. Algorithm optimization: Apply efficient algorithms and data structures to optimize your code. For example, use a hash table instead of a linear search when looking up data.
  3. Memory management: Effectively manage memory use in your code to avoid unnecessary memory allocation and deallocation.
  4. Parallelization: Use parallelization techniques such as multithreading or multiprocessing to take advantage of multiple cores and improve the  performance of your code.   
  5. Caching: Use caching techniques to store frequently accessed data to avoid recalculating the same data multiple times.
  6. Optimize database access: Optimize database access using indexes and reduce the number of database calls.
  7. Minimize network calls: Minimize the number of network calls by batching them or using a cache.
  8. Use built-in libraries: Use built-in libraries and frameworks optimized for performance rather than creating your own.
  9. Choose faster languages and runtimes:  Languages like C and C++ enable more efficient resource utilization, which can reduce the number of servers or other resources needed to handle a given workload.

Cost allocation tags for the AWS Billing console dashboard

Cost allocation tags are metadata you can apply to your AWS resources to help identify and track costs. Each tag consists of a key-value pair to categorize and organize your costs.  You can identify and track spending by department, project, or application by enabling cost allocation tags for the Billing console and dashboard. The tags can help you understand how costs are incurred across your organization so you can take steps to optimize them.

AWS Cost Explorer vs. CUDOS Dashboard


AWS Cost explorer is a native solution for cost and usage reports on the Amazon Web Services Console. However, it has its limitations regarding detailed cost information at a  resource level. The CUDOS (Cloud Intelligence Dashboard) is an AWS solution based on Amazon QuickSight, Amazon Athena, and AWS Glue. It utilizes the AWS Cost and Usage report to provide a detailed cost analysis via different dashboards.

Overall, the CUDOS dashboard is a more powerful and versatile solution for analyzing costs across an AWS Organizations. To set up the CUDOS dashboard, consult the AWS workshop that describes all the necessary steps and functions in detail.

Utilize billing and budget alerts


Billing and budget alerts on AWS help you save money, optimize your cloud resources, and stay within your budget. Here are a few reasons why you should consider using these features:

  • Cost savings: Alerts help you quickly identify and address potential cost issues before they get out of hand.
  • Improved resource management: Receive notifications when costs exceed certain thresholds, so you can identify resources that are not used effectively and optimize or terminate them.
  • Better budget planning: Budget alerts help you stay within your budget by notifying you when you are approaching or exceeding your budgeted costs. They help avoid unexpected charges and properly plan your spending.
  • Proactive monitoring: Billing and budget alerts allow you to monitor your costs, so you can proactively address any issues that arise. Monitoring can help you stay on top of your AWS billing and make more informed decisions about your cloud spending.

Cost reductions support sustainable business

Reducing costs and sustainability often go hand in hand as sustainable practices and using sustainable resources can lead to long-term savings. For example, energy-efficient resources such as Graviton-2 and GP3 can reduce energy bills for AWS, resulting in better prices that can benefit your customers. And improving the performance of your code reduces the runtime of the underlying hardware, saving energy and automatically reducing costs. Companies prioritizing sustainability often attract more environmentally conscious customers and investors, boosting their reputation and financial performance.

 Amazon Web Services shared responsibility model

It’s worth reflecting on the responsibilities necessary to achieve your organization’s sustainability goals. Amazon Web Services shared responsibility model outlines the roles of AWS and its customers in maintaining the security and compliance of the cloud platform. The basic premise is that AWS is responsible for the underlying infrastructure’s security, and its customers are responsible for protecting their applications and data. The AWS shared responsibility model for sustainability is similar. It focuses on the environmental impact of AWS’ services and its customers’ use. In this model, Amazon Web Services is responsible for providing sustainable and efficient infrastructure, while customers are responsible for using the infrastructure in a sustainable way. For example, AWS is responsible for designing and operating energy-efficient data centers, while customers are responsible for optimizing their resource usage and reducing their carbon footprint through practices such as auto-scaling and energy-efficient configurations.

Get help cutting the cost of your AWS services

As an AWS Premier Partner, T-Systems supports companies in using AWS end-to-end. We support the development of the AWS strategy, particularly the optimization of financial infrastructure. We ensure governance and optimization across all AWS workloads and guide our customers to a more sustainable, transparent, and cost-conscious cloud infrastructure. Get in touch with us if you are looking for FinOps consulting support.

About the author

Roman Schneider

AWS Consultant, T-Systems International GmbH

Show profile and articles

You might also like...

Do you visit t-systems.com outside of India? Visit the local website for more information and offers for your country.