Sub topic 13
Hybrid Traffic with VPN and Direct Connect
This chapter covers the transfer costs of traffic between AWS and an on-premises network. It assumes you know VPC routing basics, the difference between a virtual private gateway and a Transit Gateway, and how to read Cost Explorer usage types from earlier chapters. Hybrid links have two cost parts: a fixed charge for the connection and a per-GB charge for data that leaves AWS.
How hybrid traffic is billed
Billing depends on direction. Data moving into AWS from your data center is free, whether it arrives over the internet, a VPN, or Direct Connect. Data moving out of AWS to your data center is billed per GB.
This asymmetry affects design. Uploading backups, logs, or migration data to AWS costs nothing in transfer fees. Pulling large datasets back to on-premises systems is where the bill grows.
| Option | Fixed charge | Per-GB charge for data leaving AWS | Typical use |
|---|---|---|---|
| Site-to-Site VPN over the internet | Hourly per VPN connection | Standard internet data transfer out rate | Low or moderate volume, backup path, quick setup |
| Accelerated Site-to-Site VPN | Hourly per connection plus an hourly accelerator charge | Internet rate plus an accelerator transfer fee | Lower latency over long distances |
| Direct Connect | Hourly per port, plus any partner or cross-connect fees | A lower Direct Connect rate, which varies by Region and location | Steady, high-volume transfer |
| VPN or Direct Connect attached to Transit Gateway | Hourly per attachment | The rates above, plus Transit Gateway data processing per GB | Many VPCs sharing one hybrid link |
Prices change and differ by Region. Use the numbers in this chapter only as illustrations, and check the current pricing pages before you decide.
What a VPN costs
A Site-to-Site VPN connection charges an hourly fee while it exists. Each connection has two tunnels, and the fee covers both. Traffic leaving AWS through the VPN is billed at the normal internet data transfer out rate. A VPN gives you encryption and a private address space, but it does not give you cheaper egress.
A VPN has two limits to know:
- Each tunnel carries up to about 1.25 Gbps. To go beyond that, attach the VPN to a Transit Gateway and use equal-cost multipath (ECMP) across several tunnels.
- Transit Gateway adds an hourly attachment fee and a per-GB data processing fee. Each GB crossing the gateway pays that fee on top of the transfer charge.
A VPN is cheap to keep when volume is low. Its monthly cost is mostly the connection fee, so a VPN that moves little data costs little.
What Direct Connect costs
Direct Connect has a port-hour charge for the dedicated or hosted connection, and often a separate cross-connect or partner fee. Data leaving AWS over Direct Connect is billed at a rate well below the internet rate. Data entering AWS is free.
The lower per-GB rate has to pay for the fixed port cost. This calculation estimates the monthly volume where Direct Connect starts to cost less than sending the same data out over the internet or a VPN:
HOURS_PER_MONTH = 730
# Illustrative rates only. Replace them with current prices for your Region and location.
internet_rate_per_gb = 0.09 # data transfer out to the internet or over a VPN
dx_rate_per_gb = 0.02 # data transfer out over Direct Connect
port_cost_per_hour = 0.30 # 1 Gbps dedicated port
extra_monthly_fees = 0.0 # cross-connect or partner fees, if any
fixed_monthly = port_cost_per_hour * HOURS_PER_MONTH + extra_monthly_fees
saving_per_gb = internet_rate_per_gb - dx_rate_per_gb
break_even_gb = fixed_monthly / saving_per_gb
print(f"Fixed monthly cost: ${fixed_monthly:,.2f}")
print(f"Saving per GB: ${saving_per_gb:.2f}")
print(f"Break-even volume: {break_even_gb:,.0f} GB per month")With these numbers the fixed cost is $219 a month and the saving is $0.07 per GB, so the break-even point is about 3,100 GB of outbound data per month. Below that volume the VPN costs less. Above it Direct Connect costs less, and the gap grows with every extra GB.
The calculation leaves out several things that often decide the choice:
- A production design needs two connections in separate locations, which doubles the fixed cost.
- Many teams keep a VPN as a backup path, which adds its own hourly fee.
- Direct Connect gives stable latency and bandwidth. A cost-only comparison does not capture that.
- Provisioning can take weeks, so a VPN may carry traffic in the meantime.
Choosing a path
The choice starts with how much data leaves AWS each month, then looks at how steady the traffic is and how many VPCs share the link.
A Direct Connect gateway lets one connection reach VPCs in several Regions. With a private virtual interface to a virtual private gateway, no Transit Gateway data processing fee applies. If you route through a Transit Gateway for convenience, every GB pays that fee. When only one or two VPCs need the link, the simpler attachment is cheaper.
Reaching AWS services from on-premises
On-premises clients often call S3 or other AWS APIs. There are three ways to reach them, with different costs:
- Over the internet: Requests to public endpoints leave your network through your own internet link. Data returned by AWS to your network is billed at the internet transfer rate.
- Public virtual interface: Direct Connect carries traffic to public AWS endpoints such as S3. Data out is billed at the Direct Connect rate, and nothing passes through a NAT gateway.
- Interface endpoint over a private virtual interface: On-premises hosts resolve a private endpoint address in your VPC. You pay an hourly fee per endpoint and a per-GB processing fee. This keeps traffic off public addresses, but it is not the cheapest option for large volumes.
A gateway endpoint for S3 does not work from on-premises. Gateway endpoints use route table entries inside a VPC, so traffic from your data center cannot use them. Use a public virtual interface or an interface endpoint for hybrid access.
Reducing hybrid bytes
Choosing the connection is only part of the work. These changes reduce the volume itself:
- Process data where it lives. If an analysis reads 500 GB and returns a 2 GB summary, run it in AWS. Only the 2 GB leaves, and the 500 GB arrives free.
- Cache on-premises. A local cache or mirror for container images, OS packages, and repeated downloads avoids fetching the same object each time.
- Compress before transfer. Compress files and API payloads on the sending side, as covered in the compression chapter.
- Schedule restores. Backup uploads are free, but restores and large exports incur transfer out. Test restore volumes so the bill does not surprise you.
- Avoid hairpin paths. Traffic that enters AWS over Direct Connect and returns to another on-premises site through AWS pays for transfer out. Route site-to-site traffic over your own WAN when possible.
Verifying hybrid costs
Group the Direct Connect service by usage type to see how much data you move and what it costs. This command filters on the service name and shows each usage type for last month:
aws ce get-cost-and-usage \
--time-period Start=2026-10-01,End=2026-11-01 \
--granularity MONTHLY \
--metrics UnblendedCost UsageQuantity \
--filter '{"Dimensions":{"Key":"SERVICE","Values":["AWS Direct Connect"]}}' \
--group-by Type=DIMENSION,Key=USAGE_TYPE \
--query "ResultsByTime[].Groups[].[Keys[0], Metrics.UnblendedCost.Amount, Metrics.UsageQuantity.Amount]" \
--output textPort-hour usage types show the fixed charge. Data transfer usage types show the variable charge. If the variable part is small compared with the port cost, the link is underused. If it dominates, check whether a second port or a different location would lower the rate.
VPN costs appear under the VPC service rather than a separate service. Use the same usage type grouping and look for VPN connection hours and, when attached, Transit Gateway data processing.
Common mistakes
- Assuming a VPN is cheaper per GB. It is billed at internet rates. Only the fixed cost is low.
- Ignoring Transit Gateway processing. A convenient shared hub charges per GB on every flow crossing it.
- Counting only the port. Cross-connects, partner fees, and a redundant second connection belong in the comparison.
- Measuring total traffic instead of outbound traffic. Inbound data is free and does not count toward the break-even volume.
- Forgetting restores. A cheap backup plan can become expensive the first time you restore a large dataset to on-premises hardware.
Exercise
Your data center sends 4 TB a month into AWS and pulls 1.5 TB a month back out. A Direct Connect port costs $219 a month, internet or VPN egress is $0.09 per GB, and Direct Connect egress is $0.02 per GB. Using 1 TB = 1,000 GB, should you buy Direct Connect on cost alone?
Show answer
No. Only the 1.5 TB (1,500 GB) leaving AWS counts, because inbound data is free. The saving is 1,500 GB × $0.07 = $105 a month, which is less than the $219 port cost. The break-even volume is about 3,100 GB outbound a month, so a VPN is cheaper unless latency, bandwidth stability, or growth justifies Direct Connect.
Exercise
Several VPCs share one Direct Connect link through a Transit Gateway, and the bill shows a large Transit Gateway data processing charge. Name one change that could remove it for a high-volume VPC.
Show answer
Attach the high-volume VPC directly to the Direct Connect gateway through a private virtual interface and a virtual private gateway instead of routing through the Transit Gateway. Traffic on that path does not pay the per-GB Transit Gateway processing fee. Keep the Transit Gateway only for VPCs that need its routing features.