Understanding AWS Pricing for EC2, S3, EBS, RDS, Lambda & More

Jul 31st, 2024
Understanding AWS Pricing for EC2, S3, EBS, RDS, Lambda & More
URL Copied

How does AWS Price Its Services? 

AWS offers several pricing models to accommodate different usage patterns, providing opportunities to optimize and reduce costs. The models include a free tier, on-demand pricing, where resources are typically billed per second, spot instances, reserved instances, savings plans, and dedicated hosts.

Beyond pricing models, Amazon has a separate pricing structure for each service. In this article, we’ll discuss pricing for the following popular cloud services:

  • EC2 (Elastic Compute Cloud): Charged based on compute capacity usage. Pricing options include on-demand, reserved, and spot instances, with costs varying by instance type and region.
  • S3 (Simple Storage Service): Priced by storage usage, data retrieval, and data transfer. Different storage classes (Standard, Intelligent-Tiering, Glacier) have different rates.
  • EBS (Elastic Block Store): Costs depend on the volume type (SSD, HDD) and storage size. Snapshots incur additional charges.
  • RDS (Relational Database Service): Charged based on the database instance type, storage, and data transfer. Pricing includes on-demand and reserved instances.
  • Lambda: Billed by the number of requests and the duration of code execution. Different rates apply for x86 and Arm architectures.
  • EFS (Elastic File System): Costs based on storage consumption and data transfer, with different rates for Standard, Infrequent Access, and Archive classes.

In this article:

The 6 AWS Pricing Models 

Before we dive into pricing for specific Amazon services, let’s briefly describe the pricing models offered by AWS, which can allow you to optimize and reduce pricing for different workloads.

1. Free Tier

The AWS Free Tier provides new customers with the opportunity to explore and experiment with a wide range of AWS services at no cost for the first 12 months. It includes services like Amazon EC2, Amazon S3, Amazon RDS, and AWS Lambda. For example, users can run up to 750 hours of EC2 compute time per month using the t2.micro instance, store up to 5 GB of standard storage on S3, and make up to 1 million Lambda requests per month. 

The Free Tier aims to help users get hands-on experience with AWS and understand how to build and scale applications in the cloud without any financial risk. It’s important to monitor usage, as exceeding the free tier limits results in standard pay-as-you-go charges.

2. On-Demand

On-demand pricing allows users to purchase compute and database capacity by the hour or second, depending on the service. There are no long-term commitments or upfront payments required, making it a highly flexible option. This model is suitable for applications with unpredictable workloads or for those that cannot be interrupted. 

For example, if an application experiences variable traffic, users can quickly scale up or down the resources in response to demand. The pay-as-you-go approach ensures that users only pay for what they use, providing a cost-effective solution for short-term, spiky, or temporary workloads.

3. Spot Instances

Spot instances offer the ability to bid for unused AWS capacity at significantly lower prices than on-demand instances. This pricing model is suitable for applications that have flexible start and end times, can tolerate interruptions, or are stateless and can be easily restarted. Spot instances can provide savings of up to 90% compared to on-demand prices. 

They are suitable for batch processing, big data analytics, containerized workloads, CI/CD, and high-performance computing. However, it’s important to design applications to handle interruptions, as AWS can terminate spot instances with a two-minute warning when the capacity is needed elsewhere. This requires building fault-tolerant systems that can gracefully handle the loss of instances.

4. Reserved Instances

Reserved instances (RIs) provide a discount (up to 75%) compared to on-demand pricing in exchange for committing to use AWS resources for a one- or three-year term. RIs are suitable for applications with steady-state usage or predictable workloads. They come in three payment options: All Upfront (payment for the full commitment period made in advance), Partial Upfront, and No Upfront. 

Additionally, AWS offers flexibility with convertible RIs, which can be exchanged for another RI with different attributes if business needs change. This model helps in achieving cost predictability and optimization, making it a strategic choice for long-term projects.

5. Savings Plans

Savings plans are a flexible pricing model that provides significant savings on AWS usage, similar to Reserved Instances but with more flexibility. By committing to a consistent amount of usage (measured in USD per hour) for a one- or three-year term, users can save up to 72% on their AWS bills. 

Savings Plans automatically apply to any usage that matches the plan, regardless of instance family, region, operating system, or tenancy. There are two types of Savings Plans: Compute Savings Plans, which apply to any EC2 instance usage, and EC2 Instance Savings Plans, which provide the most savings but apply only to specific instance families in a chosen region. 

6. Dedicated Hosts

Dedicated hosts provide physical servers that are dedicated to a single customer, allowing them to use their existing server-bound software licenses and address the relevant compliance requirements. This model is suitable for users needing a single-tenant infrastructure for security, regulatory, or performance reasons. 

Dedicated hosts give customers more control over their server placement and allow them to use their own licensing, which can result in cost savings. For example, organizations running legacy software that is licensed per physical server or core can take advantage of dedicated hosts to optimize their costs and meet licensing requirements. These hosts also support bringing your own license (BYOL) for software from vendors such as Microsoft and Oracle.

Region-Based Pricing: What You Should Know

AWS pricing can vary significantly based on the region where services are deployed. Each AWS region operates independently, and prices can differ due to various factors, including the cost of electricity, real estate, and local taxes in each location. Additionally, the availability of specific AWS services may vary by region, which can also impact pricing. 

When planning and optimizing costs, it's essential to consider regional pricing differences and choose the most cost-effective region that meets your compliance, latency, and redundancy requirements. 

This chart below shows the difference in average per-hour price for instances in different AWS Regions around the world. The cheapest regions are the US Regions, including us-east-1  (N. Virginia), us-east-2 (Ohio), and us-west-2 (Oregon) with an average price of $0.25653 per hour. European regions are in the middle, such as eu-west-3 (Paris) at $0.26933. The most expensive region is South America (São Paulo), with the average price for sa-east-1 at $0.30974.

Source: CloudPrice.net

Pricing for Key AWS Services 

The pricing details here are for the US East (N. Virginia) Region, and correct as of the time of this writing. For up-to-date pricing and additional details refer to the official pricing page.

AWS EC2 Pricing

On-Demand Pricing

On-demand pricing is charged per instance-hour consumed, from the time an instance is launched until it is terminated or stopped. Here are examples of on-demand pricing for different instance types:

  • t4g.nano: $0.0042 per hour, with 2 vCPUs and 0.5 GiB memory.
  • t4g.micro: $0.0084 per hour, with 2 vCPUs and 1 GiB memory.
  • t3.medium: $0.0416 per hour, with 2 vCPUs and 4 GiB memory.
  • t3.large: $0.0832 per hour, with 2 vCPUs and 8 GiB memory.
  • t3.xlarge: $0.1664 per hour, with 4 vCPUs and 16 GiB memory.

Savings Plans Pricing

Savings plans offer discounts of up to 72% in exchange for a commitment to a consistent amount of usage over a one- or three-year term. 

For example, here are savings plans rates for the instances listed above, with a 3-year commitment and no upfront payments. In this configuration, AWS provides a discount of 50% compared to the on-demand price:

  • t4g.nano: $0.0021 per hour
  • t4g.micro: $0.0042 per hour
  • t3.medium: $0.0206 per hour
  • t3.large: $0.0413 per hour
  • t3.xlarge: $0.0826 per hour

Spot Instances Pricing

Spot instances allow users to bid for unused capacity at significantly lower prices, and can be interrupted at 2 minutes’ notice. They are suitable for workloads that can handle interruptions, such as batch processing or big data analytics.

Here are examples of spot pricing for the instances listed above, as of the time of this writing. Note that spot instance pricing is volatile, see the official spot pricing page for up-to-date rates:

  • t4g.nano: $0.002 per hour, a 52% saving compared to the on-demand rate.
  • t4g.micro: $0.0033 per hour, a 50% saving compared to the on-demand rate.
  • t3.medium: $0.016 per hour, a 62% saving compared to the on-demand rate.
  • t3.large: $0.034 per hour, a 60% saving compared to the on-demand rate.
  • t3.xlarge: $0.1261 per hour, a 24% saving compared to the on-demand rate.

Dedicated Hosts Pricing

Dedicated hosts provide physical servers for exclusive use. On-demand pricing examples include:

  • m5: $5.069 per hour.
  • m5d: $5.966 per hour.
  • m6g: $2.71 per hour.
  • m7i: $10.644 per hour.

Dedicated hosts are suitable for workloads requiring dedicated hardware, compliance, and licensing requirements.

Learn more in our detailed guide to AWS EC2 costs.

AWS S3 Pricing 

The key components of S3 pricing include storage costs, request and retrieval charges, data transfer fees, and additional features like data management and replication.

Storage Pricing

Amazon S3 storage costs vary based on the storage class and the amount of data stored. The primary storage classes include:

  • S3 Standard: Suitable for frequently accessed data. Charges are:
    • First 50 TB/month: $0.023 per GB
    • Next 450 TB/month: $0.022 per GB
    • Over 500 TB/month: $0.021 per GB
  • S3 Intelligent-Tiering: Automatically moves data between two access tiers (frequent and infrequent) to optimize costs. Charges include:
    • Monitoring and automation: $0.0025 per 1,000 objects
    • Frequent access tier: Same rates as S3 Standard
    • Infrequent access tier: $0.0125 per GB
    • Archive access tier: $0.0036 per GB
    • Deep archive access tier: $0.00099 per GB
  • S3 Standard-Infrequent Access (S3 Standard-IA): For data that is accessed less frequently but requires quick access when needed. Costs are $0.0125 per GB.
  • S3 One Zone-Infrequent Access (S3 One Zone-IA): For infrequently accessed data stored in a single availability zone. Costs are $0.01 per GB.
  • S3 Glacier Classes: Suitable for long-term data archiving with varying retrieval times:
    • S3 Glacier Instant Retrieval: $0.004 per GB
    • S3 Glacier Flexible Retrieval: $0.0036 per GB
    • S3 Glacier Deep Archive: $0.00099 per GB

Request and Retrieval Pricing

Users are charged for the requests made to S3 and the retrieval of data from specific storage classes:

  • PUT, COPY, POST, LIST requests: $0.005 per 1,000 requests for S3 Standard and S3 Intelligent-Tiering.
  • GET, SELECT, and other requests: $0.0004 per 1,000 requests.
  • Lifecycle transition requests: Charges apply for moving data between storage classes. For example, transitioning data to S3 Standard-IA or S3 One Zone-IA costs $0.01 per 1,000 requests.

In addition, there are special retrieval costs for data in infrequent access or archival storage classes:

  • S3 Glacier Flexible Retrieval:
      • Standard retrieval: $0.01 per GB, $0.05 per 1,000 requests
      • Expedited retrieval: $0.03 per GB, $10 per 1,000 requests
  • S3 Glacier Deep Archive:
    • Standard retrieval: $0.02 per GB, $0.10 per 1,000 requests
    • Bulk retrieval: $0.0025 per GB, $0.025 per 1,000 requests

AWS RDS Pricing 

AWS RDS pricing consists of several key components:

Instance Hourly Price

The hourly cost of an AWS RDS instance varies based on the instance type and the region. There are various instance types, each designed for different performance needs. For example:

  • db.t4.medium: General-purpose instance with 4GB memory and 2 vCPUs, costing $72.80 per month.
  • db.r4.2xlarge: High-performance instance with 61GB memory and 8 vCPUs, costing $821.05 per month.

Instance Pricing Model

You can choose between two pricing models:

  • On-demand: Allows you to launch and terminate instances at any time, offering flexibility but at a higher hourly rate.
  • Reserved: Requires a commitment of one to three years, offering significant cost savings but less flexibility.

Storage Costs

AWS RDS supports three types of storage:

  1. Magnetic storage: Legacy storage type, not recommended for new databases. Costs $0.10 per GB.
  2. General purpose SSD (gp2 and gp3): Suitable for most workloads, costing $0.115 per GB.
  3. Provisioned IOPS (io1 and io2): Suitable for I/O-intensive applications. For example, 50GB storage with 1,000 IOPS costs $6.25 for storage and $100 for IOPS.

Data Transfer Costs

Data transfer costs apply to data moving in and out of AWS data centers. These costs vary based on the amount of data and the region. The main categories include:

  • Inbound data transfer: Data coming into AWS from the internet or other regions.
  • Outbound data transfer: Data going out from AWS to the internet or other regions.

AWS EBS Pricing

Here are the key components of AWS EBS pricing:

Volume Pricing

Amazon EBS volumes are charged based on the amount of storage provisioned, and the costs vary depending on the type of EBS volume chosen:

  • General Purpose SSD (gp3):
      • Storage: $0.08 per GB-month
      • IOPS: First 3,000 IOPS are free; $0.005 per provisioned IOPS-month over 3,000
      • Throughput: First 125 MB/s are free; $0.040 per provisioned MB/s-month over 125 MB/s
  • General Purpose SSD (gp2): Storage is $0.10 per GB-month
  • Provisioned IOPS SSD (io2):
      • Storage: $0.125 per GB-month
      • IOPS: Up to 32,000 IOPS at $0.065 per provisioned IOPS-month; 32,001 to 64,000 IOPS at $0.046 per provisioned IOPS-month; Above 64,000 IOPS at $0.032 per provisioned IOPS-month
  • Provisioned IOPS SSD (io1):
      • Storage: $0.125 per GB-month
      • IOPS: $0.065 per provisioned IOPS-month
  • Throughput Optimized HDD (st1): Storage is $0.045 per GB-month
  • Cold HDD (sc1): Storage is $0.015 per GB-month

Snapshot Pricing

Amazon EBS snapshots provide point-in-time copies of EBS volumes, and they are charged based on the storage consumed by the snapshots:

    • Standard Snapshots: Storage is $0.05 per GB-month
  • Archive Snapshots: Storage is $0.0125 per GB-month; retrieval is $0.03 per GB of data retrieved

EBS Snapshots are stored incrementally, meaning only the changed blocks are billed. Archive snapshots, however, are full copies and are billed for all blocks stored.

Additional Features and Costs

Other options include:

    • Fast Snapshot Restore (FSR): $0.75 per Data Services Unit-Hour (DSU-Hour) per snapshot in each Availability Zone where FSR is enabled.
    • Recycle Bin for EBS Snapshots: Billed at the same rate as standard EBS Snapshots to protect against accidental deletions.
  • Direct APIs for Snapshots:
    • ListChangedBlocks and ListSnapshotBlocks: $0.0006 per thousand requests
    • GetSnapshotBlock: $0.003 per thousand SnapshotAPIUnits
    • PutSnapshotBlock: $0.006 per thousand SnapshotAPIUnits

AWS Free Tier

New AWS customers can use the AWS Free Tier to get started with Amazon EBS, which includes:

  • 30 GB of storage
  • 2 million I/Os
  • 1 GB of snapshot storage

AWS EFS Pricing

Amazon Elastic File System (EFS) offers a scalable solution for file storage without the need for provisioning or managing storage capacity. AWS charges users based on the actual usage of primary and backup storage, as well as the read, write, and tiering activities. Below are the main components of EFS pricing.

Storage Pricing

EFS provides three storage classes, each optimized for different access patterns and cost requirements:

  • EFS Standard: $0.30 per GB-month. Suitable for frequently accessed data, offering sub-millisecond latency performance.
  • EFS Infrequent Access (EFS IA): $0.016 per GB-month. Optimized for data that is accessed less frequently, typically a few times a quarter.
  • EFS Archive: $0.008 per GB-month. Designed for long-lived data accessed a few times a year or less.

Backup Pricing

EFS provides robust data protection with EFS Backup, which is managed through AWS Backup:

  • Warm Backup: $0.05 per GB-month
  • Cold Backup: $0.01 per GB-month

Users only pay for the storage used and the data restored within a month, with no minimum fees or setup charges.

Data Transfer and Throughput Pricing

EFS charges for data transfer and access across all storage classes:

  • Reads: $0.03 per GB transferred
  • Writes: $0.06 per GB transferred
  • Infrequent Access Reads (Incremental Charge): $0.01 per GB transferred
  • Infrequent Access Tiering: $0.01 per GB transferred (applies to data tiered from Standard to IA and vice versa)
  • Archive Reads (Incremental Charge): $0.03 per GB transferred
  • Archive Tiering: $0.03 per GB transferred (applies to data tiered from Standard or IA to Archive and vice versa)

AWS Free Tier

For new AWS customers, EFS offers a free tier allowing up to 5 GB of EFS Standard storage for 12 months. This helps users to explore and utilize EFS without initial costs.

AWS Lambda Pricing

AWS Lambda offers a serverless computing service where users can run code without provisioning or managing servers. The pricing structure is based on the number of requests and the duration of code execution.

Request Pricing

Users are charged for each request that starts executing in response to an event trigger such as Amazon SNS, Amazon EventBridge, Amazon API Gateway, or other AWS SDKs. AWS Lambda charges $0.20 per 1 million requests.

Duration Pricing

The duration is calculated from the time your code begins executing until it returns or terminates, rounded up to the nearest millisecond. The cost depends on the amount of memory allocated to the function. AWS Lambda offers two processor architectures: x86 and Arm, with different pricing tiers:

For x86 functions:

  • First 6 billion GB-seconds per month: $0.0000166667 per GB-second
  • Next 9 billion GB-seconds per month: $0.000015 per GB-second
  • Over 15 billion GB-seconds per month: $0.0000133334 per GB-second

For Arm functions:

  • First 7.5 billion GB-seconds per month: $0.0000133334 per GB-second
  • Next 11.25 billion GB-seconds per month: $0.0000120001 per GB-second
  • Over 18.75 billion GB-seconds per month: $0.0000106667 per GB-second

Provisioned Concurrency Pricing

Provisioned concurrency keeps functions initialized and ready to respond in milliseconds. It incurs additional costs:

  • $0.0000041667 per GB-second for Provisioned Concurrency for x86
  • $0.0000033334 per GB-second for Provisioned Concurrency for Arm

Ephemeral Storage Pricing

AWS Lambda allows the allocation of ephemeral storage for functions, billed based on usage:

  • $0.0000000309 per GB-second

512 MB of ephemeral storage is provided at no additional cost.

Data Transfer and Additional Charges

Data transfer to and from AWS Lambda functions is billed at standard Amazon EC2 data transfer rates. Data transfer within the same AWS Region between AWS services like S3, DynamoDB, and others is generally free.

Lambda@Edge Pricing

Lambda@Edge, which runs code closer to users of the application to improve performance, is priced separately:

  • Requests: $0.60 per 1 million requests
  • Duration: $0.00005001 per GB-second

AWS Free Tier

The AWS Lambda free tier includes one million free requests per month.

Learn more in our detailed guide to AWS cost Lambda (coming soon)

6 Ways to Reduce the Price of AWS Services 

Here are some of the ways that organizations can ensure they select the most cost-effective pricing options in AWS.

1. Understand Your Usage Patterns

Start by analyzing your current resource utilization and identifying trends in your workload. AWS Cost Explorer is a helpful tool for visualizing your usage and cost data, allowing you to spot opportunities for optimization. Look for patterns in resource consumption, such as peak usage times and idle periods, to adjust your AWS usage accordingly. 

This insight can help you decide when to use on-demand instances for unpredictable workloads, or reserved instances and savings plans for consistent usage. Regularly reviewing and understanding your usage patterns ensures you are not over-provisioning resources.

2. Right-Size Your Resources

Right-sizing resources involves matching your AWS resources to your actual workload requirements. By continuously monitoring and adjusting the size of your instances, storage, and other resources, you can avoid overpaying for unused capacity. Free tools like AWS Trusted Advisor and AWS Compute Optimizer provide recommendations for resizing instances based on your utilization metrics. 

For example, if an EC2 instance consistently uses only a fraction of its allocated CPU and memory, downgrading to a smaller instance type can lead to significant cost savings. Optimizing storage configurations by choosing the appropriate storage class for your data can reduce costs without compromising performance.

3. Use Instance Scheduling

Instance scheduling is a technique to automatically start and stop instances based on predefined schedules, which can significantly reduce costs for non-24/7 workloads. By using AWS Instance Scheduler, you can define custom schedules for instances based on usage patterns, ensuring that instances run only when needed. 

This practice is particularly beneficial for development, testing, and other environments that do not require continuous operation, leading to substantial cost savings without affecting productivity. For example, you might schedule development instances to run only during business hours, automatically shutting them down after hours and on weekends.

4. Optimize Storage Costs

Optimizing storage costs involves choosing the right storage solutions and configurations based on your data access patterns and requirements. AWS offers various storage classes for Amazon S3, such as Standard, Intelligent-Tiering, and Glacier, each designed for different use cases. 

Frequently accessed data should use Standard storage, while infrequently accessed data can benefit from the lower costs of Glacier or Intelligent-Tiering. Additionally, consider using Amazon EBS snapshots to back up data and Amazon EFS for scalable file storage. Regularly review your storage usage and move data to the most cost-effective storage classes.

5. Use Spot Fleet for Batch Processing

Spot Fleet allows you to use a combination of spot instances, on-demand instances, and reserved instances to optimize costs and performance for batch processing and fault-tolerant workloads. By diversifying instance types and availability zones, you can maximize resource availability while minimizing costs. 

Spot Fleet automatically scales and replaces interrupted instances, ensuring continuity of your tasks at a fraction of the cost compared to on-demand instances. For example, you can set up a Spot Fleet to handle large-scale data processing or simulations, benefiting from the significant cost savings of spot instances while maintaining performance and reliability through a mix of other instance types.

6. Use Cost Management Tools

AWS provides several cost management tools to help you monitor, analyze, and optimize your spending. AWS Cost Explorer, AWS Budgets, and AWS Cost and Usage Report offer detailed insights into your AWS expenses and resource utilization. These tools allow you to set custom cost and usage budgets, receive alerts when thresholds are exceeded, and identify cost-saving opportunities. 

Additionally, dedicated cloud cost optimization tools can provide more advanced analytics and recommendations, and enable multi-cloud cost management. By using these cost management tools, you can maintain better control over your AWS spending and make informed decisions to optimize your infrastructure costs.

AWS Cost Management Made Easy with Finout

Finout's FinOps solution is particularly adept at managing AWS costs, including those associated with Amazon Elastic Kubernetes Service (EKS), making it an excellent tool for organizations leveraging AWS's extensive cloud services. It facilitates real-time cost allocation and reassignment across the entire AWS infrastructure, which is pivotal for companies with intricate and dynamic cloud environments.

Furthermore, Finout natively integrates into the entire company infrastructure without adding code or an agent, giving a holistic view of the entire company's cloud spend, rather than allocating and governing spend in minutes, making adopting FinOps for enterprises easier than ever before.

Learn more about Finout for AWS cost optimization

Main topics