How AWS Pricing Works
AWS (Amazon Web Services) does not charge a single flat fee. Instead, almost every service bills you across one or more “dimensions” — the things you actually consume, like seconds of compute, gigabytes of storage, or the number of requests you make. Your monthly bill is simply the sum of all these tiny meters added together. Understanding the dimensions before you build is the single best way to avoid a nasty surprise at the end of the month.
The four big billing dimensions
Most of AWS spending falls into four buckets. If you can reason about these four, you can estimate the cost of almost any architecture.
| Dimension | What it measures | Typical unit | Example service |
|---|---|---|---|
| Compute time | How long a server or function runs | vCPU-seconds or instance-hours | Amazon EC2 (Elastic Compute Cloud — rentable virtual servers), AWS Lambda (run code without managing servers) |
| Storage | How much data you keep, over time | GB-month (gigabyte stored for one month) | Amazon S3 (Simple Storage Service — object storage), Amazon EBS (Elastic Block Store — virtual disks) |
| Requests / operations | How many times you call a service | per million requests | S3 GET/PUT, Lambda invocations, API Gateway calls |
| Data transfer | Bytes moving between places | GB transferred | Almost everything |
A “GB-month” trips up beginners. Storing 100 GB for a full month costs the same as storing 200 GB for half a month — it is the amount multiplied by the time. AWS prorates this by the hour, so short-lived data is cheap.
Pay-as-you-go vs commitments
By default AWS is pay-as-you-go: you turn a resource on, you pay for what you use, you turn it off, the meter stops. There is no upfront fee and no contract. This is perfect when your usage is unpredictable or you are still experimenting.
Once your workload is steady and predictable, you can lower the rate by committing to a baseline amount of usage for one or three years. In return AWS gives you a large discount (often 30-72%).
| Model | How it works | When to use it | When NOT to use it |
|---|---|---|---|
| On-Demand (pay-as-you-go) | Full price, no commitment | Spiky, new, or short-lived workloads | Steady 24/7 workloads (you overpay) |
| Savings Plans / Reserved Instances | Commit to spend or capacity for 1-3 years | Predictable, always-on baseline | Workloads you might delete soon |
| Spot Instances | Bid on spare capacity, up to 90% off | Fault-tolerant batch jobs | Anything that can’t be interrupted |
Tip: Never buy a commitment in your first month. Run on-demand, watch your real usage in Cost Explorer for a few weeks, then commit only to the steady baseline you are confident will stay on.
Data transfer: the silent budget killer
Here is the dimension that catches almost everyone, because it never shows up in the obvious “this server costs $X/hour” sticker price. Data transfer is billed on bytes that move, and the rules are not intuitive.
- Inbound (data coming INTO AWS from the internet) is almost always free. Uploading is free; this lulls people into ignoring transfer entirely.
- Internet egress (data leaving AWS to the internet) costs money — typically around $0.09 per GB for the first tier, dropping at higher volumes. A busy website or video service can run up hundreds of dollars here.
- Cross-AZ traffic costs money. An Availability Zone (AZ — an isolated datacenter within a Region) talking to another AZ in the same Region is billed at roughly $0.01/GB in each direction. Two chatty services in different AZs quietly add up.
- Cross-Region traffic costs more. Sending data from
us-east-1toeu-west-1is billed per GB and is more expensive than cross-AZ.
The danger is that none of this is visible when you draw your architecture. A microservice calling a database 50 times per request, across AZs, generates invisible cross-AZ charges on every single call.
How to find a service’s real dimensions
Never assume. Each AWS service has its own pricing page listing the exact dimensions you will hit. Read it before you build.
Console steps:
- Open the AWS Pricing Calculator at
calculator.aws. - Click Create estimate and search for your service (for example, “EC2”).
- Fill in your expected usage — instance type, hours per month, and crucially the data transfer out field.
- Add each service to the estimate; the calculator shows a per-service and total monthly cost.
AWS CLI — you can also query live prices directly from the Price List API:
aws pricing get-products \
--service-code AmazonEC2 \
--region us-east-1 \
--filters "Type=TERM_MATCH,Field=instanceType,Value=t3.micro" \
"Type=TERM_MATCH,Field=location,Value=US East (N. Virginia)" \
--max-results 1
Output:
{
"FormatVersion": "aws_v1",
"PriceList": [
"{\"product\":{\"sku\":\"...\"},\"terms\":{\"OnDemand\":{\"...\":{\"priceDimensions\":{\"...\":{\"unit\":\"Hrs\",\"pricePerUnit\":{\"USD\":\"0.0104000000\"}}}}}}}"
]
}
That 0.0104000000 is the on-demand hourly rate for a t3.micro — but remember, it does not include the data transfer your app will generate.
A worked example
Imagine a small web app on one t3.micro EC2 instance (i-0a1b2c3d4e5f) in us-east-1, with a 30 GB EBS volume, serving 500 GB of traffic to the internet each month.
| Item | Calculation | Approx. monthly cost |
|---|---|---|
| Compute | $0.0104/hr x 730 hrs | $7.59 |
| Storage (EBS gp3) | 30 GB x $0.08/GB-month | $2.40 |
| Internet egress | 500 GB x ~$0.09/GB | $45.00 |
| Total | ~$55 |
Notice that data transfer is the largest line item — bigger than the server itself. This is exactly why egress deserves attention from day one.
Best practices
- Read the per-service pricing page for every service you adopt, and note the dimensions you will actually hit (not just the headline hourly rate).
- Keep chatty services in the same Availability Zone to avoid cross-AZ transfer charges.
- Put a CDN (Content Delivery Network) like Amazon CloudFront in front of public traffic; it lowers egress costs and serves users faster.
- Keep traffic inside a single Region whenever possible; cross-Region transfer is the most expensive movement.
- Use VPC endpoints so traffic to services like S3 stays on the AWS private network instead of routing out to the internet.
- Start on-demand, measure real usage for a few weeks, then buy commitments only for the steady baseline.
- Set up a budget alert early so you learn about runaway transfer costs in days, not at the end of the month.