Billing, pricing and support · 13 min
How does AWS charge for compute, storage and data?
In this lesson you will learn which three things generate almost all of the cost in AWS, how each one is measured and which data transfers are charged and which are not.
In AWS you pay for what you use while you use it, instead of buying your own servers and disks. Each service decides how it measures that usage: by time running, by space used or by data sent. Knowing how usage is measured in the services that appear most on the exam lets you estimate a cost before you pay it, monitor it while it runs and lower it. For example, an online store that knows it is charged for every hour its computer is on can turn it off during the hours when nobody shops.
What generates cost in AWS?

The AWS whitepaper on pricing says that almost all of the cost comes from three things:
- Compute, which is the work a computer does, such as running a program or responding to someone who visits a website.
- Storage, which is the data you keep saved, such as photos, documents or backups.
- Outbound data transfer, which is the data that leaves AWS for another place, for example a customer's phone.
Each service has its own pricing page, but almost all of them answer the same questions: how long a resource was running, how much data you stored and how much data you moved out of AWS. For example, in an online store the compute is the computer that shows the website, the storage is the product photos and the outbound transfer is those photos traveling to each customer's phone.
The prices AWS publishes on those pages don't include taxes, unless the page says otherwise. That is why the total on your bill can be higher than the sum of the prices you read. For example, if your country charges a tax on digital services, the store sees it added to its bill even though it doesn't appear on the pricing page.
How is compute charged?
Compute is charged from the time you launch a resource, meaning from when you create it and turn it on, until you terminate it. In Amazon EC2, the AWS service for renting computers, each computer is called an instance. An On-Demand Instance, which is the way to pay for EC2 with no commitment, is charged per hour or per second, with a minimum of 60 seconds. For example, if the store turns on an instance for ten minutes to test a change, it pays for ten minutes and not the full hour.
Per-second billing applies to Linux, Windows and several other operating systems, while some, such as SUSE Linux Enterprise Server, are charged by the full hour. For example, an instance with SUSE Linux Enterprise Server that runs for ten minutes pays for the whole hour.
An instance you stop no longer generates compute charges, which is why stopping what you don't use is the most direct way to lower this cost. The same whitepaper estimates that stopping the instances you don't use can lower the cost by 70% or more, compared with keeping them running all the time. For example, a school that only uses its instances during class hours can stop them at night and on weekends, and it pays no compute for those hours.
True or false?
0 of 4If you turn on a Linux On-Demand Instance for ten minutes, you pay for ten minutes.
If you turn it on for 20 seconds, you pay for 20 seconds.
All operating systems are charged per second.
A stopped instance no longer generates compute charges.
How is storage charged?
Storage is charged per GB per month, but each service counts those GB differently:
- Amazon EBS, which is the disk of an EC2 instance and charges for the GB you provision (the ones you requested when you created the volume) until you delete the volume. For example, if the store creates a 500 GB volume and stores 10 GB, it pays for 500 GB, just as if it rented a large warehouse and kept it almost empty.
- Amazon S3, which stores files and charges for the GB you actually store, plus requests (read, write, list) and the data you move out. For example, if the store keeps 10 GB of product photos in S3, it pays for 10 GB, plus each time a page requests a photo. In S3 Standard the price per GB goes down when you go over 50 TB per month, and goes down again when you go over 500 TB.
How much are you charged?
You create a 500 GB Amazon EBS volume and store only 10 GB. How many GB of storage are you charged for each month?
Amazon S3 storage classes
In S3 the price also depends on the storage class you choose for each object. A class is a way of storing the file with its own price and its own speed for reading it. The classes range from S3 Standard, for data that is read often, to S3 Glacier Deep Archive, for data that is almost never read.

The less it costs to store each GB in a class, the more it costs and the longer it takes to read its data. In addition, each class charges a minimum duration: if you delete an object from S3 Standard-IA before 30 days, you pay for the remaining days, and in S3 Glacier Deep Archive that minimum is 180 days. For example, the store keeps its product photos in S3 Standard because they are viewed all day, and sends to S3 Glacier Deep Archive the old invoices it only keeps in case someone asks for them someday.
Which data transfer is charged?
Data transfer is moving data from one place to another: from the internet to AWS, from AWS to the internet or between parts of AWS. In general, bringing data into AWS doesn't cost anything, and neither does moving it between services in the same Region. What is charged is mostly data going out, although there are cases inside AWS that also have a cost.

Each data movement has its own billing rule:
- Inbound transfer from the internet to AWS, which is not charged. For example, when the store uploads its photos to S3.
- Outbound transfer from AWS to the internet, which is charged per GB and where you get 100 GB free each month, adding up all services and Regions (except China and GovCloud). For example, when a customer opens the website and the photos travel to their phone.
- Transfer between Availability Zones in the same Region, which is charged in both directions. For example, when the store copies its data to a second zone so it doesn't lose it if the first one fails.
- Transfer between EC2, RDS, Redshift and ElastiCache instances within the same Availability Zone, which is free. RDS, Redshift and ElastiCache are AWS services for storing and querying data, such as the database with the store's orders.
- Transfer between Regions, where data going out of the source Region is charged and data coming into the destination Region has no charge. For example, if the store copies its data from the United States to São Paulo, it pays for the data going out of the United States.
- Transfer from S3 to another service in the same Region, which is free. For example, when one of the store's instances reads a photo from S3 to make it smaller.
For outbound transfer to the internet, the price per GB goes down the more data you move out. Some services have exceptions to these rules, and in that case what applies is each service's pricing page. For example, a video app that sends a lot of data to its users pays less per GB than a small store that sends little.
Is the transfer charged?
0 of 6Tap the correct column for each data movement.
Uploading 1 TB of backups from the internet to S3
Serving videos to users on the internet
Replicating a database between two Availability Zones in the same Region
Two EC2 instances in the same zone that send each other data
Copying data from us-east-1 to sa-east-1
An EC2 instance reads a file from S3 in the same Region
If your account uses the new experience
The new experience is the way to open an AWS account with Google, GitHub, Apple, Amazon or email. The billing rules are the same in both account types, and what changes is where you work and what you can use. Your projects are in the US East (Ohio) Region, us-east-2, and you can't change it, so everything you try lives in a single Region. For example, if you want to try the charge between Regions by copying data to São Paulo, you can't do it with this account.
On the free plan, in addition, an AWS policy doesn't let you upload objects to S3 with the S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive classes. If you want to try a class cheaper than S3 Standard, use S3 Standard-IA or S3 Intelligent-Tiering. For example, to practice with the store's old invoices, upload them to S3 Standard-IA.
On the exam
Questions on this topic usually describe a scenario and ask what generates the cost or how to lower it. To choose, look in the question for these words, which point to the answer:
- "Uploading data to AWS" or "inbound data transfer", which describe a movement with no cost.
- "Serving content to users on the internet" or "outbound data transfer", which describe a movement that is charged.
- "Replica in another Availability Zone", which implies transfer between zones, and that is charged.
- "Pay only for what you use" or "variable expense instead of fixed expense", which describe the pay-as-you-go model.
- "Data that is almost never read" together with "lowest storage cost", which point to an S3 Glacier class.
For example, if a question says that a company keeps logs that are almost never read and wants the lowest storage cost, look for the option with an S3 Glacier class.
Review question
Every night a company uploads 2 TB of video from its office to an Amazon S3 bucket. Some Amazon EC2 instances in the same Region read those videos from the bucket and process them. Which part of this flow generates a data transfer charge?
Next
- Key principles, from the AWS whitepaper on how pricing works. The English version marks it as historical reference, so some figures have already changed: the whitepaper gives up to 75% off for reservations, while the current EC2 pages say up to 72%. For discounts, check each service's pricing page.
- cloud path practice exams, where after finishing an exam you see your result for domain 4 (Billing, Pricing, and Support).