Back to blog

Understanding AWS Cost: The Basics and 7 Best Practices

Bar Yochai Shaya

Director of Solution Engineering & Technical Sales, Intel Granulate

How Much Does AWS Cost? 

Amazon Web Services (AWS) offers Infrastructure-as-a-Service (IaaS), Software-as-a-Service (SaaS), and Platform-as-a-Service (PaaS) products under different pricing models. You can leverage Amazon’s growing cloud ecosystem with over 160 AWS services providing computing power, content delivery, and database storage.

Before you commit to an AWS solution, you should evaluate the best payment plan for your organization’s needs to ensure you only pay for the services you use without additional upfront costs or cancellation fees. You can better plan and optimize your AWS costs if you know your expected usage. 

AWS offers cost management tools to help you predict your resource demands and select the right pricing options. Generally, flexible options are more expensive, while long-term commitments are cheaper (per unit). Here are some things to consider when planning your AWS costs.

This is part of an extensive series of guides about DevOps.

In this article:

How AWS Pricing Works 

AWS costs depend on three main drivers: storage, compute, and outbound data transfer. These aspects vary depending on the product and AWS pricing model. Usually, Amazon doesn’t charge you for inbound or inter-service data transfers within the same AWS Region. However, you need to check the data transfer rates because there will be some exceptions. 

AWS charges you at a specified rate for outbound data transfers, applicable to all traffic across the services you use. This cost will appear on your monthly statement under Data Transfer Out. The rate changes depending on the amount of data you transfer—transferring more data costs less per GB. 

New call-to-action

You pay for compute resources per hour, starting from the launch of a resource until its termination. However, there is also an option to reserve compute resources at a set cost. Usually, you pay for data transfer and storage per GB.

You can choose from several AWS pricing models, depending on the service, including: 

  • On-demand instances—you pay for database or compute capacity per second or hour (minimum 60 seconds) without an upfront payment or long-term commitment.
  • Savings plans—flexible pricing options with lower prices for Amazon EC2, AWS Fargate, and AWS Lambda. You commit to a set usage level for one or three years, with a discounted price per hour. 
  • Spot instances—a pricing model for Amazon EC2 instances that lets you purchase unused capacity from AWS without upfront commitments, providing a significant discount (up to 90% off on-demand instance pricing).
  • Reserved instances—you pay for capacity in advance to receive a large discount (up to 75%). 

Learn more in our detailed guides to:

7 Best Practices to Optimize AWS Costs 

1. Use the AWS Pricing Calculator

AWS Pricing Calculator is a web-based planning tool that generates estimates for specific use cases in AWS. You can use it to model solutions and research AWS service pricing before preparing a quote. You can use it to plan your spending, discover cost-saving opportunities, and make informed decisions when using Amazon Web Services.

AWS Pricing Calculator is useful for users new to AWS. It is also useful for those who want to restructure or expand their use of AWS. No cloud or AWS experience is required to take advantage of the AWS Pricing Calculator.

Learn more in our detailed guide to AWS cost calculator

2. Use AWS Cost Management Tools

AWS Cost Management is a set of tools that provide insight into your costs and usage in the AWS public cloud.

AWS Cost Management provides several tools:

  • Billing and expense management console—the Billing section of the Amazon console allows you to view the services used in AWS and optimize their structure.
  • AWS budget—create and track budgets in the AWS Budgets Console or Budgets API. Track monthly, quarterly or yearly budgets with customizable start and end dates.
  • AWS Cost Explorer—view cost and usage data in AWS Cost Explorer to identify trends, isolate overages, and spot budget anomalies. Cost Explorer creates a default set of reports to start with. Administrators can create custom reports for specific time periods, filters, groups, or forecasts.
  • AWS cost anomaly detection—continuously monitors your costs and usage to detect spending anomalies using machine learning.

Learn more in our detailed guide to:

3. Utilize or Sell Redundant Reserved Instances

Reserved instances can greatly reduce your Amazon costs, but only if you are using them. If you have an unused reservation, take advantage of it—find unused or underutilized Reserved Instances and use them for new or existing applications running on more expensive On-Demand Instances. Otherwise, consider selling your RIs on the Reserved Instance Marketplace.

4. Leverage EC2 Spot Instances

For workloads that are fault-tolerant, you can use Amazon EC2 Spot Instances to reduce your costs by up to 90%. However, these instances are not suitable for all workloads because they can be interrupted with 2 minutes’ notice. 

Examples of workloads suitable for spot instances include web servers, big data, CI/CD, dev/test, and containerized workloads. Amazon offers Spot Fleet, a feature that allows you to launch both On-Demand and Spot Instances in a given auto scaling group, allowing you to reserve uninterrupted On-Demand Instances for important components.

Learn more in our detailed guide to AWS spot instances

5. Reduce Amazon S3 Costs with Storage Tiers

Analyze access patterns to storage for image datasets over a 30-day period using S3 Analytics. This allows you to reduce costs by leveraging S3 Low Access (S3 IA). You can use lifecycle policies to automatically move these objects to a less expensive storage tier. Alternatively, you can enable S3 Intelligent-Tiering to automatically analyze objects and move them to the optimal storage tier.

New call-to-action

6. Review Networking and Delete Idle Load Balancers

Trusted Advisor can perform idle load balancer checks to report the load balancers with a RequestCount below 100 in the last seven days. You can then remove the load balancers to minimize costs. 

You can also use Amazon Cost Explorer to check data transfer costs. If transferring data to the public Internet from EC2 is expensive, you can use Amazon CloudFront. The Amazon CloudFront Content Delivery Network (CDN) allows you to cache images, videos, and static web content at edge locations around the world. CloudFront does not need to over-provision capacity to handle potential traffic spikes.

7. Review and Adjust EC2 Auto Scaling Group Configurations

EC2 Auto Scaling groups allow you to scale the EC2 fleet up or down as needed. View scaling activity via the console or with the describe-scaling-activities CLI command. Analyze the results and adjust your scaling strategy—for example, be less aggressive when adding instances. Also check your configuration to see if you can lower the minimum to meet end-user requests while using a smaller fleet size.

See Additional Guides on Key DevOps Topics

Together with our content partners, we have authored in-depth guides on several other topics that can also be useful as you explore the world of DevOps.

Cloud Optimization

Authored by Intel Tiber App-Level Optimization

Continuous Delivery

Authored by Codefresh

GitOps

Authored by Codefresh

Optimize application performance.

Save on cloud costs.

Start Now
Back to blog