aws_dx_connection cost estimation
A dedicated physical network connection from on-premises to AWS. Priced per port-hour by bandwidth, plus per-GB data transfer at a lower rate than internet.
An aws_dx_connection is a dedicated physical fiber link from your data center to an AWS Direct Connect location. Right for high-throughput, low-latency, or consistent-performance traffic that VPN can't deliver economically.
Pricing has two components.
Port hours: a continuous per-hour charge based on bandwidth. Common options: - 1 Gbps: $0.30/hour ($219/month) - 10 Gbps: $2.25/hour ($1,642/month) - 100 Gbps: $22.50/hour ($16,425/month)
Hosted Connections (sub-1Gbps): provided through AWS partners at lower bandwidth (50 Mbps to 500 Mbps). $0.03-$0.22/hour depending on bandwidth.
Data transfer out: significantly cheaper than internet egress. $0.02/GB to $0.04/GB depending on region, vs $0.09/GB for standard internet egress. Data transfer in is free (same as for any AWS service).
Direct Connect Gateway (aws_dx_gateway): free as a resource. Used to attach a Direct Connect to multiple VPCs or Transit Gateway.
When DX pays for itself: at sustained high throughput. A 1 Gbps connection at $219/month plus data transfer breaks even with internet egress at roughly 3-4 TB/month. Above that, DX is strictly cheaper. Below that, VPN or internet egress is cheaper.
c3x reads bandwidth from the connection. Data transfer through DX is usage-based via c3x-usage.yml.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_dx_connection" "office" {
name = "office-1g"
bandwidth = "1Gbps"
location = "EqDC2"
tags = {
Environment = "production"
}
}
resource "aws_dx_gateway" "main" {
name = "production-dx-gateway"
amazon_side_asn = "64512"
}
resource "aws_dx_gateway_association" "main" {
dx_gateway_id = aws_dx_gateway.main.id
associated_gateway_id = aws_ec2_transit_gateway.main.id
allowed_prefixes = ["10.0.0.0/8"]
}Pricing dimensions
What you actually pay for when you provision aws_dx_connection.
| Dimension | Unit | What's being charged |
|---|---|---|
| Port hours (1 Gbps) | per hour | 1 Gbps dedicated port. $0.30/hour ≈ $219/month |
| Port hours (10 Gbps) | per hour | 10 Gbps dedicated port. Right for high-throughput workloads. $2.25/hour ≈ $1,642/month |
| Port hours (100 Gbps) | per hour | 100 Gbps dedicated port. Right for very large enterprises. $22.50/hour ≈ $16,425/month |
| Hosted Connection sub-1Gbps | per hour | 50 Mbps to 500 Mbps connections provided through AWS partners. |
| Data transfer out via DX | per GB | Significantly cheaper than internet egress. Varies by region. $0.02/GB in US regions |
| Data transfer in | free | Inbound bytes are free, same as for all AWS services. $0 |
Optimization tips
Common ways to reduce aws_dx_connection cost without changing the workload.
Right-size port bandwidth to actual utilization
Major when oversizedA 10 Gbps port at $1,642/month is wasteful if you're using 200 Mbps. Check CloudWatch DirectConnect metrics. Downsize to 1 Gbps or a hosted connection if appropriate.
Use DX only for high-throughput steady traffic
Avoid unnecessary fixed costDX makes sense when you sustain 3+ TB/month or need <5ms latency. For occasional or low-volume traffic, VPN or even regular internet egress is cheaper.
Connect multiple VPCs via DX Gateway, not separate connections
$219/month per avoided portDX Gateway is free; it lets one physical connection serve many VPCs. Avoid the temptation to provision separate DX ports per VPC.
Negotiate Hosted Connection terms with AWS Partners
Partner-dependentHosted Connections from AWS Partners can be cheaper than direct AWS port pricing for sub-1 Gbps needs. AWS Partners aggregate ports across customers.
Use VPN as backup, not as primary high-throughput
Workload-dependentMany enterprises use VPN as DX backup. Don't try to handle production throughput on VPN alone; DX is roughly 10x cheaper per GB for steady high-volume traffic.
FAQ
When is DX cheaper than VPN?
At sustained throughput above ~3 TB/month. VPN's connection-hours are cheap ($36/month) but its data transfer is at standard internet egress rates ($0.09/GB). DX's port-hours are higher but per-GB is $0.02-$0.04. Crossover depends on volume.
Does c3x estimate DX cross-connect fees?
No. Cross-connect fees from the colocation facility to the AWS DX router are billed by the colocation provider, not AWS. They're typically $100-$300/month and not visible in AWS Terraform resources.
What's a Hosted Connection vs a Dedicated Connection?
Dedicated: full physical port at AWS prices, requires colocation in an AWS DX facility. Hosted: a logical connection over an AWS Partner's physical port, available in more sub-1Gbps options. Hosted is right for organizations without colocation presence.
How does DX work with Transit Gateway?
Attach the DX Gateway to your TGW via aws_dx_gateway_association. The TGW becomes a hub for both VPC traffic and on-premises traffic. Each TGW attachment is billed separately.
Related resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_dx_connection.