Sub topic 11
Managing cross-region traffic and replication
This chapter assumes you can read a Cost Explorer usage-type breakdown and know how S3 buckets, versioning, and IAM roles work. It builds on the earlier chapters on traffic paths and cost visibility. Here the focus is data that leaves one AWS Region for another.
How cross-region transfer is billed
Data sent from a resource in one Region to a resource in another Region is billed as inter-region data transfer. The key rules:
- The sending Region pays. Inbound transfer to the destination is not charged.
- The rate depends on the Region pair. Many pairs between US and EU Regions cost about $0.02 per GB, but some Regions cost more. Check the pricing page for your pair.
- The charge applies whether the traffic uses public or private IPs. Peering two VPCs across Regions does not make the traffic free.
- It is billed per GB, so a chatty service or a nightly bulk copy produces a steady, predictable cost that is easy to overlook.
In Cost Explorer, inter-region charges appear as usage types that name both Regions, such as USE1-USW2-AWS-Out-Bytes (sent from us-east-1 to us-west-2). If you group by usage type, as in the earlier chapter, these lines tell you which Region pair produces the cost.
Where cross-region traffic comes from
Most unexpected inter-region spend comes from a short list of sources:
| Source | What drives the cost |
|---|---|
| S3 Cross-Region Replication (CRR) | Every replicated byte, plus destination storage and PUT requests |
| DynamoDB global tables | Replicated writes in each Region, plus transfer |
| RDS and Aurora cross-Region replicas or snapshot copies | Replication stream and snapshot copy volume |
| EBS or AMI snapshot copies | One-time transfer per copy, repeated if automated |
| Application calls to a service in another Region | Request and response payloads |
| Centralized logging or metrics sent to a hub Region | Continuous log volume |
| Cross-region VPC peering or Transit Gateway peering | Transfer at inter-region rates plus any attachment fees |
The pattern is the same in each case. A design decision (a disaster recovery copy, a shared service, a central log account) creates a constant flow of bytes. Nobody revisits it after launch.
Decide whether the traffic needs to cross Regions
Before tuning, ask why each flow exists. There are usually four answers, and each leads to a different action.
- Remove it. Test environments that replicate to a second Region, or old replication rules that nobody owns, are common finds.
- Reduce it. Replicate only what you need, compress what you send, and avoid copying the same data repeatedly.
- Move the consumer. If a batch job in us-west-2 reads terabytes from a us-east-1 bucket each day, run the job in us-east-1.
- Accept it. Disaster recovery and data residency are real requirements. In that case, make the cost visible and budgeted.
Replicate less with S3 replication rules
CRR copies new objects by default for the whole bucket. A rule with a filter limits what is copied. The destination bucket and the source bucket must both have versioning enabled.
cat > replication.json <<'EOF'
{
"Role": "arn:aws:iam::111122223333:role/s3-replication-role",
"Rules": [
{
"ID": "replicate-critical-only",
"Status": "Enabled",
"Priority": 1,
"Filter": { "Prefix": "critical/" },
"DeleteMarkerReplication": { "Status": "Disabled" },
"Destination": {
"Bucket": "arn:aws:s3:::example-dr-bucket-eu",
"StorageClass": "STANDARD_IA"
}
}
]
}
EOF
aws s3api put-bucket-replication \
--bucket example-source-bucket-us \
--replication-configuration file://replication.jsonThis rule does three things that reduce cost:
- It replicates only objects under the
critical/prefix. Logs, caches, and scratch data stay in the source Region. - It stores the copy in
STANDARD_IA, which lowers destination storage cost. Check the minimum storage duration and the per-GB retrieval fee before using it for data you read often. - It leaves delete marker replication off, so deletions in the source do not propagate. Whether that is acceptable depends on your recovery requirements.
Some details that matter for cost:
- Replication is billed as inter-region transfer plus PUT requests and storage in the destination. Many small objects therefore cost more per GB than a few large ones, because each object is a separate request.
- Replication applies to objects created after the rule is active. Copying existing objects uses S3 Batch Replication, which is a separate job and a one-time transfer charge.
- Replication Time Control (RTC) guarantees a replication time target and adds a per-GB fee on top of the transfer. Turn it on only if you need the service-level target.
- Two-way replication doubles the flow. If both buckets replicate to each other for a multi-Region active setup, each write is paid for once in each direction of travel.
Keep compute next to its data
The cheapest cross-region byte is the one you never send. Look for these anti-patterns:
- Analytics in the wrong Region. An Athena, EMR, or Glue job that reads a bucket in another Region pays transfer on every full scan. Run the job in the bucket's Region and copy only the results.
- Cross-region database reads. An application in one Region that queries a database in another pays for every row returned, and it adds latency. A read replica in the application's Region sends the data once instead of once per query. Compare the replica's replication stream cost with your read volume before committing.
- Central log shipping. Sending raw logs from every Region to one hub can be large. Filter and aggregate before shipping, or keep logs in the Region where they are produced and query them there.
- Repeated snapshot copies. Automated snapshot copy jobs that run daily transfer the changed blocks each time. Reduce the frequency or the retention if your recovery objectives allow it.
Reduce the bytes you do send
When the flow is necessary, shrink it:
- Compress payloads before sending. Text formats such as JSON and logs often compress by 70 to 90 percent with gzip or zstd, and the CPU cost is usually small compared with the transfer saved.
- Use columnar formats such as Parquet for data that is copied between Regions for analytics. They are smaller than CSV and let consumers read only the columns they need.
- Deduplicate before copying. Replicating a bucket that contains many copies of the same artifact moves each copy.
- Cache in the consuming Region. If many hosts fetch the same object across a Region boundary, put it in a local bucket or cache once, and have the hosts read the local copy.
Verify the effect
After a change, confirm it in the data instead of assuming it worked.
- In Cost Explorer, group by usage type and filter on
AWS-Out-Byteswith the Region pair in the name. Compare the same period before and after. - Use daily granularity so a replication rule that was removed shows as a drop on a specific date.
- Check the S3 replication metrics (
BytesPendingReplication,OperationsPendingReplication) in CloudWatch if you enable replication metrics. A growing backlog means the flow is larger than the rule you think you wrote.
A worked estimate
Suppose a workload writes 4 TB per month to a bucket in us-east-1 and replicates everything to eu-west-1. At an illustrative $0.02 per GB, 4 TB (about 4,096 GB) costs about $82 in transfer each month. If only 25 percent of the data is under a critical/ prefix, the filtered rule transfers about 1,024 GB, which is about $20. The saving is roughly $62 per month in transfer, plus the matching reduction in destination storage and request charges. The numbers are small for one bucket and large for a hundred of them, which is why a periodic review of replication rules pays off.
Exercise
A team replicates an entire 10 TB bucket from us-east-1 to eu-west-1 for disaster recovery, but only the objects under the orders/ prefix (about 20 percent of the data) are needed for recovery. Name two changes that reduce the cost, and name the Cost Explorer usage type pattern you would watch to confirm the change.
Show answer
First, add a filter to the replication rule so only the orders/ prefix is replicated, which cuts transferred bytes, destination storage, and PUT requests by about 80 percent for new data. Second, set the destination storage class to a lower-cost class such as STANDARD_IA if the recovery copy is rarely read (check retrieval fees and minimum storage duration first). Watch usage types matching USE1-EUW1-AWS-Out-Bytes (the Region-pair AWS-Out-Bytes line) at daily granularity to confirm the drop.
Exercise
A nightly Athena job in us-west-2 scans a 2 TB dataset stored in an S3 bucket in us-east-1. What is the better design, and why?
Show answer
Run the job in us-east-1, next to the bucket, and copy only the small result set to us-west-2 if needed. Scanning in us-west-2 transfers the scanned data across Regions each night and is billed at the inter-region rate, while running in the bucket's Region removes that transfer entirely.