Case study

AWS Cost Optimization: Best Practices for Reducing AWS Bill

CategoryArticles

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 blogpost: 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.

22_AWS-Cost-optimization-3.png

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.

When the StormIT team architect technology solutions on Amazon Web Services (AWS) we take optimization of cloud services costs as one of the main areas and always aim to lower costs, but this is not possible without the proper knowledge which the StormIT team can offer.

Get a cloud check-up

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 Cost Explorer and Trusted Advisor to ensure that we use the correct pricing model.

AWS has EC2 pricing models for you to choose from on-demand instances, reserved instances, and spot instances.

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:

  • 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.

5. Measure, monitor, and improve

The fifth pillar is to continuously optimize costs by monitoring and measuring your environment, repeating this operation continuously for any new changes in your entire environment.

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:

22_AWS-Cost-optimization-1.png

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

Data transfer from AWS resources (EC2, S3) to the public internet (your users) can create significant expenditure. 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.

Save up to 60% on your CDN cost with StormIT optimized pricing.

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.

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 seven years of experience working with AWS Cloud and can help you with the implementation of these recommendations. If you have any questions, please contact us for a quick chat.

Are you ready to accelerate your business to the cloud?

Contact us

Similar blog posts

See all posts
CategoryArticles

Amazon Route 53: Health Checks and DNS Failover

Learn about AWS Route 53 health-checking features and how to only route traffic to healthy AWS resources.

Find out more
CategoryCase Studies

InScope Choses StormIT and AWS for Deployment of their AML Solution

InScope chose to migrate its core technology platform to Amazon Web Services, a cloud leader in Infrastructure & Platform Services

Find out more
CategoryArticles

Scalability in Cloud Computing: Horizontal vs. Vertical Scaling

Look deeper into horizontal and vertical scaling and also into AWS scalability and which services you can use.

Find out more
CategoryArticles

What is a Web Application Firewall (WAF) and Why Use it?

What is the difference between a firewall and a web application firewall (WAF) and what are the benefits of WAF. Learn more...

Find out more
CategoryArticles

Origin Shield: How does it Help to Protect Your Origin?

Learn what Origin Shield is, its use cases, benefits, and how it improves the performance of a CloudFront distribution.

Find out more
CategoryArticles

AWS Instance Scheduler: Everything you Need to Know and Tutorial

What is the AWS Instance Scheduler? Deployment of the AWS Instance Scheduler solution. Learn more

Find out more