Case study

CategoryArticles
Updated: 8/15/2024Published: 7/13/2022

AWS Cost Optimization: Best Practices for Reducing AWS Bill

In this article, you will learn:

AWS (Amazon Web Services) enables you to control costs and continuously optimize expenditures while building modern, scalable applications to meet your needs.

AWS' extensive service and pricing options provide the flexibility to effectively manage costs while still maintaining the performance and capacity you need. Start performing the following steps, which will have a direct impact on your bill today and help you reduce AWS costs.

If you are interested in learning more about AWS cost optimization tools, try reading our blog post: 8 AWS Cloud Cost Optimization Strategies and Tools

What is cost optimization in AWS?

AWS cost optimization is one of the pillars of AWS' Well-Architected framework.

6 pillars of Well-Architected framework

It focuses on achieving the lowest price for the system/workload in the AWS environment. You should optimize costs while considering your account requirements, while not ignoring factors such as performance, security and reliability.

As you migrate workloads to AWS and increase your use of various AWS services, it is essential to fully understand the value of AWS, and track and effectively manage your AWS usage and costs.

Why is AWS so expensive?

AWS Cloud resources are easy to deploy and costs are tightly coupled with usage. Companies must rely on good governance and user behavior to manage and optimize costs.

These are the main sources of wasteful spending in the AWS Cloud:

  • Mismanaged cloud resources: Idle, unused, over-provisioned.
  • Pricing complexity and difficulty predicting spending.
  • AWS offers over 200 fully-featured services and with a lot of options comes a lot of choices.

At StormIT, we offer a free AWS Well-Architected review to help you optimize your AWS infrastructure. Our team will assess your architecture to identify cost-saving opportunities and ensure you’re leveraging AWS best practices effectively. Let us help you maximize efficiency and reduce expenses.

Book a free review

AWS Cloud cost optimization pillars

AWS Cloud cost optimization pillars

Regardless of your workload or architecture, five cost optimization pillars apply to almost all environments. The pillars of AWS cost optimization are:

1. Right size

AWS has a great quote: "always right-size then reserve."

This is to select the correct instance for the resources you are currently using and the resources you plan to use. Therefore, you should always choose the cheapest available instance that meets your performance needs. You must look at the utilization of CPU, RAM, storage, network, etc., and determine the instances that can be scaled down.

You should always use Amazon CloudWatch to track metrics and set alarms so that we can react dynamically. You must ensure that resources are provided according to your needs so that your supply always meets that demand.

2. Increase elasticity

Increasing elasticity means adding flexibility to your application and using these resources when you need them, while turning off these resources when you are not using them.

It’s important to remember that sometimes you can use smaller instances for your workloads instead of fewer larger instances, which can reduce costs.

You can use AWS Auto Scaling to schedule workloads in use when needed. Therefore, usually, your production instance needs to be always on, but what about the instance that supports the test environment? Perhaps these instances can be shut down when not in use or during non-working hours. AWS provides a solution called AWS Instance Scheduler, which creates custom start and stop plans for your Amazon EC2 and RDS instances.

3. Leverage the right pricing model

After selecting the correct size instance and creating elasticity through Auto Scaling or scheduling function, you must choose the correct pricing model. Reserved Instances are an excellent choice to save money and reduce the cost of the right workload.

AWS provides recommendations for many of the services to ensure that you use the correct pricing model. You can find them in billing portal under "Recommendations".

To view your RI recommendations:

1. Sign in to the AWS Management Console and open the AWS Cost Management console

2. In the navigation pane, under Reservations, choose Recommendations.

3. Select recommendation type.

Service by pricing model and tiering:

4. Optimize storage

Maintaining storage of the right size and price is an ongoing process. In order to make the most effective use of your storage expenditures, you should optimize storage every month.

You can simplify this task in the following ways:

  • Use the newest version of EBS available.
  • Establish a mechanism for continuously optimizing storage and setting storage strategies.
  • Use AWS cost and reporting tools to closely monitor costs, such as AWS Cost Explorer, AWS Budgets, and Detailed Billing Reports (DBR) in the Billing and Cost Management console.
  • Implement Amazon S3 object tagging and establish an S3 lifecycle strategy to continuously optimize data storage throughout the data lifecycle.
  • Pay attention to costs associated with data transfer between regions or out of AWS.

5. Measure, monitor, and improve

Measure, monitor and improve to achieve continuous cost optimization. The most important thing you can do is to define metrics and implement tags and cost allocation tags, and then review your plan on a regular basis.

AWS cost optimization best practices

These are six best practice areas for cost optimization:

AWS cost optimization best practices

1. Expenditure and usage awareness

AWS provides you with greater agility and flexibility, which eliminates the manual processes and time required to configure on-premises infrastructure. Therefore, you no longer need to negotiate prices, manage purchases, arrange shipments, and then manage your team to deploy this infrastructure. AWS makes it simpler and faster, but this ease of use and unlimited on-demand computing power requires a new way of thinking about your expenses.

Accurate cost attribution allows you to understand which products and services are generating profits and helps you to make informed decisions on how to allocate your budget.

Therefore, the question you must ask is: How do you manage and monitor your usage? How can you deactivate unused resources?

The key answer here is the cost allocation tags. When applying tags to AWS resources, you can generate custom usage reports, as well as understand the abandoned resources or projects that no longer produce value.

Using Cost Explorer and AWS Budgets, you can set up alarms to notify you when you reach an overspend.

2. Cost-effective resources

Cost-effective resources are the key to cost savings, and AWS uses the appropriate instances and resources for your workload. Well-architected workloads use the most cost-effective resources, and you can use AWS Managed Services to further reduce costs. AWS also provides flexible and cost-effective pricing options and appropriate service options to reduce your usage and costs.

3. Reduce your data transfer costs

Many AWS services are paid based on data tranfer going out of them or through them.

Customers usually tend to forgot about a data tranfer fee for traffic between regions/availibility zones ($0.01 per GB). Check you AWS bill for Data transfer and if there is more than couple of dollars, answer a simple question, where this come from and do we really need this traffic?

aws data transfer diagram

Data transfer from AWS resources (EC2, S3) to the public internet (your users) can create significant expenditure. AWS charges for the data transferred out of its resources to the public internet, and this cost can quickly escalate with high traffic volumes (a lot of static content like pictures and videos). For example, if you share a 1GB video to 10000 users from Amazon S3 (10 000GB), it will be 10 TB traffic, and you'll pay around 900 dollars just for the data transfer out fees.

Dynamic or static web content can usually be cached at Amazon CloudFront edge locations worldwide, and with this solution, you can reduce the cost of data transfer out (DTO) to the public internet.

However, while CloudFront is effective, it may not always be the most cost-efficient solution for every use case. This is where FlashEdge CDN comes into play.

Maximize Performance,

Minimize Costs with FlashEdge CDN

Get free-trial now

4. Manage demand and supply resources

By matching your supply and demand, you can deliver the lowest cost for your workload. But you must have extra supply to allow for provisioning time and individual resource failures. Your demand can be fixed or variable, requiring metrics and automation.

In AWS, you can automatically provision resources to match your demand with AWS Auto Scaling. Also with demand design, buffer design, and time-based designs, these design patterns allow you to add or remove resources just as they're needed. And if you can anticipate changes in demand, you can save even more money.

So it's important to consider the patterns of usage and also the time to provision of the new resources when you're designing to match your supply against your demand.

5. Optimize over time

AWS constantly releases new services and features. AWS's best practice is to regularly review your existing architecture design to ensure that the design is always the most cost-effective. As your business needs change, actively update this environment design.

Disable the resources you don’t need, services you don’t need, and systems you don’t use, and keep up to date on AWS managed services, new services, and new features, because all of these can significantly optimize your design.

6. Practice Cloud Financial Management

CFM is a discipline that combines tools, processes, and practices to manage and optimize cloud costs. You can learn more on the official AWS CFM page about how to implement it.

StormiTIP

Optimize data transfer costs

To minimize data transfer costs, leverage caching solutions like Amazon CloudFront and evaluate alternatives like FlashEdge CDN.

Adam

AWS cost optimization checklist

Review the following list and try to follow these recommendations as much as possible:

Instances

  • Purchase instances that suit your needs.
  • Purchase reserved instances with an appropriate term. If you don't need an instance, don't keep the instance longer than necessary.
  • Purchase the latest instance type.

Scheduling

  • Schedule your instances. Let them run only during working hours and when needed.
  • Use AWS Instance Scheduler or third-party automatic scheduling tools to free tasks from your hands.
  • Shut down resources such as unused database volumes or Elastic IPs based on time or activity.

Storage

  • Store your operational files on S3 and move them between tiers based on their activities.
  • Set up lifecycle policies or use S3 Intelligent-Tiering to automatically move between frequently accessed tiers and infrequently accessed tiers.
  • Archive your less active resources on Glacier.
  • Long-term archive data backup on Glacier Deep Archive.

AWS cost management tools

  • Use cost and usage reports to analyze your expenses.
  • Use AWS Trusted Advisor to view your expense forecast and to find unused resources.
  • Create a budget plan for your resources.

The StormIT team has more than eight years of experience working with AWS Cloud and can help you with the implementation of these recommendations.

Contact us

Similar blog posts

See all posts
CategoryCase Studies

Srovnejto.cz - Breaking the Legacy Monolith into Serverless Microservices in AWS Cloud

The StormIT team helps Srovnejto.cz with the creation of the AWS Cloud infrastructure with serverless services.

Find out more
CategoryNews

Introducing FlashEdge: CDN from StormIT

Let’s look into some features of this new CDN created and recently launched by the StormIT team.

Find out more
CategoryCase Studies

AWS Well-Architected Review Series: Renewable Energy Industry Client

See how StormIT optimized a renewable energy client's AWS infrastructure through the Well-Architected Framework. Explore now...

Find out more
CategoryCase Studies

Microsoft Windows in AWS - Enhancing Kemper Technology Client Solutions with StormIT

StormIT helped Kemper Technology Consulting enhance its technical capabilities in AWS.

Find out more
CategoryCase Studies

Enhancing Betegy's AWS Infrastructure: Performance Boost and Cost Optimization

Discover how Betegy optimized its AWS infrastructure with StormIT to achieve significant cost savings and enhanced performance. Learn about the challenges faced, solutions implemented, and the resulting business outcomes.

Find out more
CategoryArticles

Amazon RDS vs. EC2: Key Differences and When to Use Each

Discover the key differences between Amazon RDS and EC2! Explore the basics, AWS RDS vs EC2, and which one to choose.

Find out more