Sub topic 12
How Region and AZ Choices Change Your Bill
This chapter assumes you know what Regions and Availability Zones (AZs) are, can run AWS CLI commands, and have seen how resources are scoped to a Region or an AZ. It covers how those choices turn into line items on your bill. Prices below are approximate us-east-1 (N. Virginia) figures used to show relative size. Check the pricing page for your Region before you plan a budget.
Where the money goes
Region and AZ decisions affect cost in three ways:
- Unit price. The same service has a different price in different Regions.
- Data transfer. Traffic between AZs, between Regions, and out to the internet is billed. Traffic inside a single AZ over private IP addresses is usually free.
- Replication. Spreading a workload across AZs or Regions means running more of something, so you pay for more of it.
Compute and storage usually dominate a small bill. Data transfer and always-on networking components cause most of the surprises.
Price differences between Regions
AWS sets prices per Region because its costs differ: land, power, network, and taxes. For many services, us-east-1 and us-east-2 are among the cheapest. Regions such as São Paulo (sa-east-1) and some in Asia Pacific are noticeably more expensive. For an On-Demand Linux instance, the gap between the cheapest and the dearest Region can be 20 to 50 percent. The gap varies by service and instance family.
Keep three points in mind:
- Price is only one of four factors. Latency, data residency rules, and service availability usually decide the Region first. Use price to choose among Regions that already meet your requirements.
- A cheaper Region can cost more overall. If your database is in a cheap Region and your users or other services are in another, inter-Region transfer fees can exceed the savings.
- Newer Regions and newer services may be missing a cheaper instance generation or a cheaper storage class. Check that what you plan to use is offered there.
Data transfer
Data transfer is billed by direction and by path. The table lists the common paths. Rates are approximate.
| Path | Typical charge | Notes |
|---|---|---|
| Internet into AWS | Free | Inbound traffic is not billed. |
| Same AZ, private IP | Free | Public or Elastic IP addresses between instances turn this into a billed path. |
| Between AZs, same Region | About $0.01/GB each direction | Both sender and receiver are charged, so about $0.02/GB for one transfer. |
| Between Regions | About $0.02/GB, billed to the sender | Rate depends on the source Region. |
| AWS out to the internet | First 100 GB/month free across services, then about $0.09/GB | Tiers get cheaper at higher volume. |
The AWS Free Tier includes the 100 GB of monthly internet egress, aggregated across services and Regions.
Cross-AZ charges grow with chatty designs. A service that makes many small calls to a database in another AZ can generate far more billable traffic than the same service serving users.
Multi-AZ multiplies resources
High availability means running more than one of something. Each extra copy costs money.
- RDS Multi-AZ keeps a synchronous standby in a second AZ. You pay for the standby instance and its storage, so the database bill roughly doubles.
- Replicated EC2 fleets need spare capacity in each AZ so the loss of one AZ does not overload the others. With three AZs you can run each at about 67 percent utilization, and with two you must stay at or below 50 percent. More AZs reduce the spare capacity per zone but add more cross-AZ paths.
- Interface VPC endpoints are billed per AZ per hour plus per GB processed. Placing one in three AZs costs three times as much as placing it in one.
- NAT gateways are billed per hour and per GB processed. Resilient designs use one per AZ.
NAT gateways deserve a worked example. The gateway charge is about $0.045 per hour, which is about $33 per month if left on, plus about $0.045 per GB processed.
| Layout | Hourly charge per month (730 h) |
|---|---|
| One NAT gateway | about $33 |
| One per AZ, three AZs | about $99 |
If instances in AZ b send traffic through the NAT gateway in AZ a, you also pay cross-AZ transfer on that path. Putting a NAT gateway in each AZ and routing each AZ's subnets to its own gateway avoids that charge and keeps outbound traffic working if one AZ fails. For development environments, a single NAT gateway, or none, is a common cost trade-off. The cost is that losing that AZ cuts off outbound access for everything.
Load balancers behave differently from each other:
- An Application Load Balancer has cross-zone load balancing on by default, and it does not bill for the cross-AZ traffic it generates.
- A Network Load Balancer has it off by default. When you turn it on, inter-AZ data is billed.
Check which load balancer you use before assuming that spreading traffic is free.
Replicating across Regions
Cross-Region designs, such as S3 Cross-Region Replication or a disaster recovery copy of a database, add several line items at once:
- Storage in the destination Region.
- Request charges for the replication writes.
- Inter-Region data transfer from the source Region.
- Compute for any standby environment you keep running.
Because you pay these costs continuously, decide which data really needs a second Region. Replicating a whole bucket of logs because "it is safer" can cost more than the workload it protects.
The Free Tier and Regions
The Free Tier does not make usage free in a specific Region. Usage is metered per account, and allowances such as the 750 monthly hours of a Free Tier eligible EC2 instance type are pooled across all Regions. If you run one eligible instance in us-east-1 and another in eu-west-1 for a full month, you use about 1,460 hours, which exceeds the 750 hours and incurs charges for the remainder. This catches many learners who experiment in several Regions and forget one.
The eligible instance type can also differ by Region, for example t2.micro in some and t3.micro in others. Look at the type the console marks as Free Tier eligible in your chosen Region.
Estimating before you build
Write down your expected traffic and use a short script to compare designs. This example estimates a month of cross-AZ transfer and NAT costs. Edit the numbers for your own case.
HOURS_PER_MONTH = 730
def nat_cost(gateways: int, gb_processed: float,
hourly: float = 0.045, per_gb: float = 0.045) -> float:
return gateways * hourly * HOURS_PER_MONTH + gb_processed * per_gb
def cross_az_cost(gb: float, per_gb_each_way: float = 0.01) -> float:
# Charged on both the sending and receiving side.
return gb * per_gb_each_way * 2
single = nat_cost(1, 500) + cross_az_cost(300)
per_az = nat_cost(3, 500) + cross_az_cost(50)
print(f"One NAT gateway: ${single:,.2f} per month")
print(f"NAT in each AZ: ${per_az:,.2f} per month")This prints about $61.35 for the single gateway and about $122.55 for three gateways. The three-gateway layout costs more in hourly charges but saves cross-AZ transfer, so which one wins depends on how much traffic you actually move. The AWS Pricing Calculator gives the same kind of estimate with current prices. Use it before you commit to a design.
Finding forgotten resources across Regions
Resources you created in a Region you rarely visit still bill you. This loop lists NAT gateways that are running in every Region enabled for your account.
for r in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do
echo "== $r"
aws ec2 describe-nat-gateways --region "$r" \
--filter Name=state,Values=available \
--query "NatGateways[].[NatGatewayId,SubnetId]" \
--output text
doneYou can adapt the same pattern to describe-addresses for Elastic IPs, describe-volumes for unattached EBS volumes, and describe-instances for running instances. Cost Explorer, grouped by Region, also shows which Regions are generating spend. Opt-in Regions you never enabled cannot generate charges.
Practical rules
- Choose the Region by latency, compliance, and service availability first. Then compare price.
- Keep chatty components, such as application servers and their database, in the same AZ when your availability goals allow it. Spread the stateless tier across AZs.
- Count per-AZ components, such as NAT gateways and interface endpoints, before adding AZs.
- Avoid public IPv4 addresses for resources that do not need them.
- Set a budget alert and review spend by Region and by usage type, such as
DataTransfer-Regional-Bytesfor cross-AZ traffic. - Delete experiments in every Region you used.
Exercise
An application runs on two instances in different AZs of one Region. They exchange 400 GB per month over private IP addresses. At about $0.01/GB in each direction, what is the monthly cross-AZ transfer cost, and what would it be if both instances were in the same AZ?
Show answer
Cross-AZ cost is 400 GB × $0.01 × 2 = $8.00 per month. In the same AZ over private IPs the transfer is free, so $0. The saving has to be weighed against losing the ability to survive an AZ failure.
Exercise
You run one Free Tier eligible EC2 instance continuously in us-east-1 and another in eu-west-1 for a 730-hour month. The allowance is 750 hours of that instance type. How many hours are billable, and why?
Show answer
1,460 − 750 = 710 billable hours. The 750-hour allowance is pooled across all Regions in the account, so it is not granted separately in each Region.
Exercise
Your team wants NAT gateways in three AZs for resilience on a development environment that has little traffic. Which cost drives the decision, and what is one cheaper alternative with its drawback?
Show answer
The hourly charge drives it: about $0.045 × 730 ≈ $33 per gateway per month, so three cost about $99 before any data processing. A cheaper option is a single NAT gateway, or none. The drawback is that if the AZ holding the gateway fails, outbound internet access is lost for all subnets that route through it. Traffic from other AZs also incurs cross-AZ transfer charges.