Launching S3 Wormhole
I'm excited to announce S3 Wormhole, a new networking technology which allows customers to dramatically reduce their cross-AZ data transfer costs.At AWS, resilience starts with the infrastructure. Every AWS Region is made up of multiple Availability Zones, and each Availability Zone consists of one or more discrete data centers with independent and redundant power, networking, and connectivity. Availability Zones are separated from each other by a meaningful physical distance — many kilometers, though all within 100 km (60 miles) — so that a fire, flood, or tornado affecting one Availability Zone does not affect the others. Each Availability Zone has its own dedicated connections to utility power and its own standalone backup power; common points of failure such as generators and cooling equipment are never shared, and Availability Zones are designed to be supplied by independent power substations.
To help customers take advantage of this infrastructure, AWS created the Well-Architected Framework, which captures decades of experience building and operating workloads in the cloud and organizes it into six pillars: operational excellence, security, reliability, performance efficiency, cost optimization, and sustainability. Customers who follow its best practices build systems that are more secure, more reliable, and more efficient.
One of the most important recommendations in the Reliability pillar is to deploy workloads to multiple locations. Because Availability Zones are independent, an application whose compute is distributed across multiple Availability Zones can keep running even if an entire Availability Zone becomes impaired.
However, data transferred between Availability Zones in the same Region is charged at $0.01/GB in each direction — $0.01/GB as it leaves one Availability Zone and another $0.01/GB as it enters the other. For applications which move large volumes of data — database replication, distributed caches, streaming pipelines, service meshes — these charges add up quickly. And in conversations with customers, I've found that the fear of cross-AZ data transfer charges is often more powerful than the charges themselves: many customers deploy their applications into a single Availability Zone, not because they have measured what a multi-AZ deployment would cost, but because they are worried about what it might cost. As one customer told me, "I know how much bandwidth it takes to download a 1 MB web page. But I have no idea how much bandwidth 50 SQL queries add up to."
Until now, you had to choose between the Reliability pillar and the Cost Optimization pillar. S3 Wormhole eliminates that tradeoff: with S3 Wormhole, you can build applications which span multiple Availability Zones, exactly as the Well-Architected Framework recommends, without worrying about cross-AZ data transfer costs.
How S3 Wormhole works
Under the hood, S3 Wormhole uses one of Amazon's basic building blocks, Amazon S3. Traffic from your application is routed into an S3 Wormhole endpoint in the same Availability Zone, which writes it to S3; an S3 Wormhole endpoint in the destination Availability Zone retrieves it and injects it back into the EC2 network. Since data transfer between Amazon EC2 and Amazon S3 in the same Region is free, your data reaches the other Availability Zone without incurring cross-AZ data transfer charges.
The following diagram shows the S3 Wormhole architecture.

Performance S3 Wormhole is designed for high-throughput workloads. To measure its performance, I launched a pair of Graviton4-based c8gn.8xlarge instances as the two ends of a wormhole and two more instances as workload generators. Using iperf3, I measured 10 Gbps of TCP throughput across 128 parallel streams:
$ iperf3 -c 10.77.18.10 -P 128 -t 180 -i 1 | tail -4 | head -2
[SUM] 0.00-180.00 sec 213 GBytes 10.2 Gbits/sec 29905 sender
[SUM] 0.00-180.59 sec 211 GBytes 10.0 Gbits/sec receiver
I've also measured 41.2 Gbps of UDP throughput; UDP is easier than TCP since it doesn't have congestion control.
Things to know
Let me share some important technical details that I think you'll find useful.
- S3 Wormhole endpoints must reach S3 through a gateway VPC endpoint. If your traffic goes through a NAT gateway instead, its $0.045/GB data processing charge makes S3 Wormhole more expensive than the cross-AZ data transfer it replaces.
- S3 Wormhole endpoints are EC2 instances, and thus have a base cost depending on the instance size, regardless of whether they are busy or idle. You'll want to estimate your traffic and pick an appropriate size; for any size of instance, the amount of bandwidth supported is 10-60 times higher than the break-even point, assuming standard on-demand instance and data transfer pricing.
- Traffic is carried through S3 in objects of up to 16 MiB by default. The efficiency of S3 Wormhole depends on being able to fit many packets into objects; below about 270 kB per object, S3 request charges alone exceed cross-AZ data transfer charges. With the default timing (aggregation waits no more than 25 ms) this translates to 86.4 Mbps of throughput; the aggregation wait is configurable but there is a tradeoff between cost reduction and added latency.
- Wormholes inherently have high latency and jitter. As such, TCP congestion control algorithms which perform well on satellite links are essential for obtaining good performance; TCP BBR can often deliver over 10x the throughput of TCP CUBIC. Depending on your operating system, you may also need to tune network buffers to obtain maximal performance.
- S3 Wormhole delivers traffic through an intermediate network path, so security group rules which reference another security group do not match traffic carried through S3 Wormhole. Consistent with other middlebox deployments in Amazon VPC, the security groups for the instances at both ends must allow the traffic using the private IP address of the other instance, or the CIDR range of the subnet containing it, as the source; a rule which references the other instance's security group will not allow the traffic.
- S3 Wormhole connects Availability Zones within a single Region. Reading from a bucket in another Region incurs inter-Region data transfer charges, so a cross-Region wormhole would save nothing.
You pay for the infrastructure used by S3 Wormhole inside your AWS account — Amazon EC2 instances for the S3 Wormhole endpoints, and Amazon S3 requests — but the S3 Wormhole service itself is free. Data in transit is stored in S3 Standard only briefly and is deleted once it has been delivered, so storage charges are negligible.
In the benchmark example above, transferring 10 Gbps between Availability Zones directly would incur cross-AZ data transfer charges of $90 per hour. Using S3 Wormhole, the same traffic costs 93% less:
| Resource | Cost per hour |
|---|---|
| S3 PUT requests (109 per second) | $1.973 |
| S3 GET requests (107 per second) | $0.155 |
| 2 × c8gn.8xlarge On-Demand | $3.792 |
| Total | $5.92 |
S3 Wormhole is available today in private preview. If you're interested in reducing your cross-AZ data transfer costs, email cperciva-s3wormhole@daemonology.net.
Frequently Asked Questions
Q. Is this an official AWS service?
A. Of course not.
Q. Why didn't this launch on April 1st?
A. Because important new AWS infrastructure traditionally launches in the week
of Cyber Monday.
Q. Is this HIPAA compliant?
A. No. Doctors routinely use fax machines, but never carrier pigeons.
Q. Did anyone at Amazon know you were doing this?
A. Absolutely not. If they knew, they would have had to try to stop me.
Amazonians aren't just people I work with; they're my friends, and I don't
want anyone to get in trouble for me being irredeemably weird.