AWS Site-to-Site VPN Advanced Diagnostics
When to use
Any advanced AWS Site-to-Site VPN investigation — accelerated VPN, ECMP configuration, certificate-based authentication, private IP VPN, CloudWatch monitoring, VPN log analysis, BGP route propagation, static route failover, tunnel health checks, DPD timeouts, multi-tunnel load balancing, or general VPN troubleshooting.
Investigation workflow
Step 1 — Collect and triage
aws ec2 describe-vpn-connections --query 'VpnConnections[*].{Id:VpnConnectionId,State:State,Type:Type,Category:Category,GatewayAssociation:TransitGatewayId}'
aws ec2 describe-vpn-connections --vpn-connection-ids <vpn-id> --query 'VpnConnections[*].VgwTelemetry'
aws ec2 describe-vpn-gateways --query 'VpnGateways[*].{Id:VpnGatewayId,State:State,AZ:AvailabilityZone}'
Step 2 — Domain deep dive
aws ec2 describe-vpn-connections --vpn-connection-ids <vpn-id> --query 'VpnConnections[*].Options'
aws cloudwatch get-metric-statistics --namespace AWS/VPN --metric-name TunnelState --dimensions Name=VpnId,Value=<vpn-id> --start-time <start> --end-time <end> --period 300 --statistics Average
aws logs filter-log-events --log-group-name /aws/vpn/<vpn-id> --start-time <epoch-ms> --limit 50
Step 3 — Detailed investigation
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventSource,AttributeValue=ec2.amazonaws.com --max-results 20
aws ec2 describe-customer-gateways --customer-gateway-ids <cgw-id>
aws ec2 describe-transit-gateway-route-tables --transit-gateway-route-table-ids <tgw-rtb-id>
Read references/guardrails.md before concluding on any VPN issue.
Tool quick reference
| Tool / API |
When to use |
ec2 describe-vpn-connections |
Get VPN connection details and tunnel telemetry |
ec2 describe-customer-gateways |
Get customer gateway configuration |
ec2 describe-vpn-gateways |
Get virtual private gateway details |
cloudwatch get-metric-statistics |
Get VPN tunnel metrics |
logs filter-log-events |
Analyze VPN connection logs |
ec2 describe-transit-gateway-route-tables |
Check TGW route propagation |
ec2 search-transit-gateway-routes |
Search for specific routes in TGW |
Gotchas: AWS Site-to-Site VPN Advanced
- Accelerated VPN uses AWS Global Accelerator for improved performance. It requires a transit gateway (not VGW) and is not available in all regions.
- ECMP (Equal-Cost Multi-Path) is only supported with transit gateway VPN attachments. VGW-based VPNs do not support ECMP. ECMP requires multiple VPN connections.
- Certificate-based authentication uses ACM Private CA certificates instead of pre-shared keys. The certificate must be issued by an ACM PCA that is in the same region.
- Private IP VPN runs over Direct Connect using private IP addresses. It requires a transit gateway and a Direct Connect gateway association.
- VPN tunnel logs (when enabled) are sent to CloudWatch Logs. Log delivery has a delay of up to 5 minutes. Not all tunnel events are logged.
- BGP route propagation from on-premises to AWS can take up to 60 seconds. Route flapping triggers BGP dampening which can delay convergence further.
- DPD (Dead Peer Detection) timeout defaults vary by customer gateway vendor. Mismatched DPD settings between AWS and the customer gateway cause tunnel flapping.
Anti-hallucination rules
- Always cite specific VPN connection IDs, tunnel endpoint IPs, or API responses as evidence.
- Accelerated VPN requires a transit gateway. Never suggest accelerated VPN with a virtual private gateway.
- ECMP requires multiple VPN connections to a transit gateway. Never claim a single VPN connection supports ECMP.
- VPN tunnel telemetry shows UP/DOWN status. Never conflate tunnel state with data plane throughput.
- Spend no more than 2 minutes on any single hypothesis. Pivot if inconclusive.
12 runbooks
| Category |
IDs |
Covers |
| A — Accelerated & ECMP |
A1–A2 |
Accelerated VPN issues, ECMP configuration |
| B — Authentication |
B1–B2 |
Certificate-based auth, private IP VPN |
| C — Monitoring |
C1–C2 |
CloudWatch monitoring, VPN log analysis |
| D — Routing |
D1–D2 |
BGP route propagation, static route failover |
| E — Tunnel Health |
E1–E2 |
Tunnel health checks, DPD timeout issues |
| F — Load Balancing |
F1 |
Multi-tunnel load balancing |
| Z — Catch-All |
Z1 |
General troubleshooting |
1---2name: vpn-advanced-troubleshooting3description: Use this skill to investigate and troubleshoot advanced AWS Site-to-Site VPN problems including accelerated VPN, ECMP, certificate-based authentication, private IP VPN, CloudWatch monitoring, log analysis, BGP route propagation, static route failover, tunnel health checks, DPD timeouts, and multi-tunnel load balancing using structured runbooks. Activate when: accelerated VPN issues, ECMP configuration problems, certificate-based auth failures, private IP VPN errors, VPN monitoring gaps, log analysis needs, BGP propagation issues, static route failover failures, tunnel health check problems, DPD timeout issues, multi-tunnel load balancing errors, or the user says something is wrong with Site-to-Site VPN.4---56# AWS Site-to-Site VPN Advanced Diagnostics78## When to use910Any advanced AWS Site-to-Site VPN investigation — accelerated VPN, ECMP configuration, certificate-based authentication, private IP VPN, CloudWatch monitoring, VPN log analysis, BGP route propagation, static route failover, tunnel health checks, DPD timeouts, multi-tunnel load balancing, or general VPN troubleshooting.1112## Investigation workflow1314### Step 1 — Collect and triage1516```17aws ec2 describe-vpn-connections --query 'VpnConnections[*].{Id:VpnConnectionId,State:State,Type:Type,Category:Category,GatewayAssociation:TransitGatewayId}'18aws ec2 describe-vpn-connections --vpn-connection-ids <vpn-id> --query 'VpnConnections[*].VgwTelemetry'19aws ec2 describe-vpn-gateways --query 'VpnGateways[*].{Id:VpnGatewayId,State:State,AZ:AvailabilityZone}'20```2122### Step 2 — Domain deep dive2324```25aws ec2 describe-vpn-connections --vpn-connection-ids <vpn-id> --query 'VpnConnections[*].Options'26aws cloudwatch get-metric-statistics --namespace AWS/VPN --metric-name TunnelState --dimensions Name=VpnId,Value=<vpn-id> --start-time <start> --end-time <end> --period 300 --statistics Average27aws logs filter-log-events --log-group-name /aws/vpn/<vpn-id> --start-time <epoch-ms> --limit 5028```2930### Step 3 — Detailed investigation3132```33aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventSource,AttributeValue=ec2.amazonaws.com --max-results 2034aws ec2 describe-customer-gateways --customer-gateway-ids <cgw-id>35aws ec2 describe-transit-gateway-route-tables --transit-gateway-route-table-ids <tgw-rtb-id>36```3738Read `references/guardrails.md` before concluding on any VPN issue.3940## Tool quick reference4142| Tool / API | When to use |43|------------|-------------|44| `ec2 describe-vpn-connections` | Get VPN connection details and tunnel telemetry |45| `ec2 describe-customer-gateways` | Get customer gateway configuration |46| `ec2 describe-vpn-gateways` | Get virtual private gateway details |47| `cloudwatch get-metric-statistics` | Get VPN tunnel metrics |48| `logs filter-log-events` | Analyze VPN connection logs |49| `ec2 describe-transit-gateway-route-tables` | Check TGW route propagation |50| `ec2 search-transit-gateway-routes` | Search for specific routes in TGW |5152## Gotchas: AWS Site-to-Site VPN Advanced5354- Accelerated VPN uses AWS Global Accelerator for improved performance. It requires a transit gateway (not VGW) and is not available in all regions.55- ECMP (Equal-Cost Multi-Path) is only supported with transit gateway VPN attachments. VGW-based VPNs do not support ECMP. ECMP requires multiple VPN connections.56- Certificate-based authentication uses ACM Private CA certificates instead of pre-shared keys. The certificate must be issued by an ACM PCA that is in the same region.57- Private IP VPN runs over Direct Connect using private IP addresses. It requires a transit gateway and a Direct Connect gateway association.58- VPN tunnel logs (when enabled) are sent to CloudWatch Logs. Log delivery has a delay of up to 5 minutes. Not all tunnel events are logged.59- BGP route propagation from on-premises to AWS can take up to 60 seconds. Route flapping triggers BGP dampening which can delay convergence further.60- DPD (Dead Peer Detection) timeout defaults vary by customer gateway vendor. Mismatched DPD settings between AWS and the customer gateway cause tunnel flapping.6162## Anti-hallucination rules63641. Always cite specific VPN connection IDs, tunnel endpoint IPs, or API responses as evidence.652. Accelerated VPN requires a transit gateway. Never suggest accelerated VPN with a virtual private gateway.663. ECMP requires multiple VPN connections to a transit gateway. Never claim a single VPN connection supports ECMP.674. VPN tunnel telemetry shows UP/DOWN status. Never conflate tunnel state with data plane throughput.685. Spend no more than 2 minutes on any single hypothesis. Pivot if inconclusive.6970## 12 runbooks7172| Category | IDs | Covers |73|----------|-----|--------|74| A — Accelerated & ECMP | A1–A2 | Accelerated VPN issues, ECMP configuration |75| B — Authentication | B1–B2 | Certificate-based auth, private IP VPN |76| C — Monitoring | C1–C2 | CloudWatch monitoring, VPN log analysis |77| D — Routing | D1–D2 | BGP route propagation, static route failover |78| E — Tunnel Health | E1–E2 | Tunnel health checks, DPD timeout issues |79| F — Load Balancing | F1 | Multi-tunnel load balancing |80| Z — Catch-All | Z1 | General troubleshooting |