Sitetositevpn
AWSOfficialPublished by AWS
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill acts as a comprehensive guide for establishing encrypted IPsec VPN connections between on-premises data centers or branch offices and AWS. It covers the entire lifecycle of a Site-to-Site VPN, including routing decisions (static vs. BGP), bandwidth sizing, high-availability configurations, and troubleshooting. The skill functions as a router, directing users to specific, self-contained reference procedures for each phase of the deployment and maintenance process.
What it does
- Guides the selection between static and dynamic (BGP) routing based on device capabilities.
- Provides procedures for creating and configuring VPN connections and target gateways.
- Assists in sizing tunnel bandwidth for standard or high-throughput requirements.
- Explains how to consolidate multiple sites using a VPN Concentrator.
- Offers guidance on applying configuration settings to on-premises customer gateway devices.
- Provides diagnostic steps for monitoring and troubleshooting tunnel connectivity.
When to use it
- When you need to connect an on-premises network to an AWS VPC over an encrypted tunnel.
- When you are deciding between static and dynamic routing for your VPN connection.
- When you need to scale throughput or consolidate multiple branch office connections.
- When you need to ensure high availability for your VPN tunnels.
- When you are experiencing connectivity issues and need to diagnose a down tunnel.
Advantages
- Provides structured, task-specific procedures for complex networking configurations.
- Ensures routing decisions are made correctly before deployment to avoid rework.
- Helps balance throughput needs with architectural constraints like gateway types.
- Clarifies the distinction between AWS-side configuration and on-premises device setup.
- Centralizes troubleshooting steps for monitoring tunnel health.
Usage examples
- “How do I decide between static and dynamic routing for my new VPN?”
- The agent will guide you through verifying your device's BGP support and your specific route-control requirements to recommend the appropriate routing type.
- “My VPN tunnel is down, how can I troubleshoot it?”
- The agent will direct you to the monitoring and troubleshooting reference to check CloudWatch metrics, logs, and common failure points.
- “How do I configure my on-premises router for the AWS VPN?”
- The agent will explain how to download the correct sample configuration file and advise on adapting it to your specific security requirements.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/aws/sitetositevpn/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip sitetositevpn.zip -d .agents/skills
Documentation by AWS
AWS Site-to-Site VPN
Overview
Domain expertise for configuring AWS Site-to-Site VPN, the managed service that builds an encrypted IP Security (IPsec) connection between an on-premises network and AWS. Covers the routing decision (static versus dynamic (BGP) routing), creating the connection and its dependent resources in the right order, sizing tunnel bandwidth, consolidating many sites through a VPN Concentrator, applying the customer gateway device configuration, building for high availability, and monitoring and troubleshooting tunnels.
This skill is a router. Each customer task maps to a procedure file under references/. Read the
matching reference in full before acting, then follow its constraints and steps. The reference
files are self-contained: each carries its own decision tables, constraints, procedure, and
troubleshooting.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging,
observability). Fall back to the AWS CLI otherwise. Site-to-Site VPN is a regional service: pass
--region {region} matching the VPC or transit gateway the connection terminates on.
Which Site-to-Site VPN task do you need?
| Goal | Reference |
|---|---|
| Decide between static and dynamic (BGP) routing before creating a connection | choosing static or dynamic routing |
| Create an encrypted VPN connection from on-premises to a VPC | creating a site-to-site vpn connection |
| Size tunnel bandwidth at Standard (1.25 Gbps) or Large (5 Gbps) | choosing tunnel bandwidth |
| Connect 25 or more low-bandwidth sites through one shared attachment | connecting many sites with a vpn concentrator |
| Configure the on-premises customer gateway device | applying the customer gateway device configuration |
| Make the connection survive tunnel maintenance and device failure | making a connection highly available |
| Detect a down tunnel and find out why | monitoring and troubleshooting tunnels |
Routing notes
Decide routing before you build. The static-versus-dynamic decision shapes the customer gateway, the failover behavior, and whether the customer can control which routes enter their network. Run the choosing-static-or-dynamic-routing reference before creating the connection so the customer does not have to recreate it to change routing type.
The target gateway gates almost everything. A virtual private gateway terminates the VPN at one VPC. A transit gateway fronts many VPCs and is the only target that supports Large (5 Gbps) tunnels, equal-cost multi-path (ECMP) bandwidth aggregation, IPv6 customer gateways, and the VPN Concentrator. The gateway choice lives in the creating reference and is referenced again by the bandwidth and concentrator references, because picking a virtual private gateway closes those doors.
Bandwidth sizing vs the Concentrator. Both scale capacity, in opposite directions. Large tunnels give one connection more throughput (up to 5 Gbps per tunnel); the Concentrator gives many low-bandwidth sites a shared 5 Gbps attachment so each site does not need its own full-bandwidth connection. Match the reference to whether the customer has one high-throughput site or many small ones.
AWS side vs device side. Creating the connection and downloading the configuration happen on the AWS side; applying that configuration happens on the customer's on-premises device, which AWS never touches. The applying-the-customer-gateway-device-configuration reference is device-side education, not an AWS-side step.
Monitoring is its own task. Detecting and diagnosing a down tunnel (CloudWatch metrics, alarms, and VPN logs) is the monitoring reference, separate from building the connection.
Additional Resources
Files
- ATTRIBUTION.mdAdded by AutoGineer937 B
- LICENSELicence file added by AutoGineer9.9 KiB
- NOTICELicence file added by AutoGineer67 B
- SKILL.md5.3 KiB
- references/applying-the-customer-gateway-device-configuration.md11.4 KiB
- references/choosing-static-or-dynamic-routing.md10.9 KiB
- references/choosing-tunnel-bandwidth-standard-or-large.md12.3 KiB
- references/connecting-many-sites-with-a-vpn-concentrator.md12.0 KiB
- references/creating-a-site-to-site-vpn-connection.md16.7 KiB
- references/making-a-connection-highly-available.md10.3 KiB
- references/monitoring-and-troubleshooting-tunnels.md19.7 KiB
references/creating-a-site-to-site-vpn-connection.md
Creating a Site-to-Site VPN Connection
Overview
Domain expertise for building an AWS Site-to-Site VPN connection: an encrypted IP Security (IPsec) tunnel between an on-premises network and a VPC. Covers the target gateway decision (virtual private gateway, transit gateway, or AWS Cloud WAN), the fixed order of the dependent resources, the customer gateway as metadata only, the distinct-ASN rule for a virtual private gateway, and choosing tunnel options at create time.
Does not cover the routing-type decision (the choosing-static-or-dynamic-routing reference), tunnel bandwidth sizing (the choosing-tunnel-bandwidth reference), the VPN Concentrator (its own reference), or applying the device configuration (the applying-the-customer-gateway-device-configuration reference). Settle routing type before running this procedure.
Execute commands using the AWS MCP server when connected (sandboxed execution, audit logging,
observability). Fall back to the AWS CLI otherwise. Site-to-Site VPN is regional; pass
--region {region} matching the VPC or transit gateway the connection terminates on.
Table of Contents
Overview
Workflow
Decision: target gateway
Creation order
The customer gateway is metadata only
Distinct ASNs for a virtual private gateway
Tunnel options at create time
Troubleshooting
Procedure
Security Considerations
Additional Resources
Workflow
To build the connection end to end, follow the procedure exactly. See the Procedure section below.
The procedure covers:
Choosing the target gateway based on how many VPCs and how much throughput the customer needs
Creating the customer gateway resource that describes the on-premises device
Creating or selecting the target gateway and attaching it to the VPC
Enabling route propagation or adding routes, and updating the security group
Creating the VPN connection with the chosen routing and tunnel options
Surfacing the console link to verify status and download the device configuration
Decision: target gateway
| Choice | Use when |
|---|---|
| Virtual private gateway (VGW) | The VPN terminates at a single VPC and the customer needs no more than 1.25 Gbps per tunnel |
| Transit gateway | The VPN fronts many VPCs, needs Large (5 Gbps) tunnels, needs ECMP bandwidth aggregation, or will use a VPN Concentrator |
| AWS Cloud WAN core network | The VPN attaches to a Cloud WAN core network |
Constraints:
You MUST establish the target gateway first, tied to how many VPCs the customer must reach and how much throughput they need. It is the most consequential choice and gates bandwidth and Concentrator options
You MUST tell the customer that a virtual private gateway cannot later be upgraded in place to Large tunnels or a Concentrator; reaching those means rebuilding on a transit gateway
You SHOULD recommend a transit gateway when the customer needs more than one VPC or any feature a virtual private gateway does not support
Creation order
The connection only works after several resources are in place in the right order. Creating the VPN connection first and stopping there leaves traffic with nowhere to flow, and no single error points at the missing piece.
Constraints:
You MUST create the resources in this order: customer gateway, target gateway attached to the VPC, route propagation or routes, security group rule, then the VPN connection
You MUST confirm each resource before moving to the next
You MUST confirm route propagation (or static routes) and the security group rule before declaring the connection ready
The customer gateway is metadata only
The customer gateway resource in AWS is only metadata: it gives AWS the device's public IP address and routing details. Customers read "gateway" and assume creating it configures their device. It does not; the device configuration is a separate step the customer owns.
Constraints:
You MUST make clear that the customer gateway resource does not configure the on-premises device
You SHOULD point the customer at the applying-the-customer-gateway-device-configuration reference for the device-side work
Distinct ASNs for a virtual private gateway
When the target gateway is a virtual private gateway, the Autonomous System Number (ASN) on the AWS side must differ from the customer gateway ASN, and the gateway must be attached to the VPC before anything routes.
Constraints:
You MUST set distinct ASNs on the AWS side and the customer gateway side for a virtual private gateway target
You MUST confirm the gateway is attached to the VPC before expecting routes to flow
Tunnel options at create time
Customers accept the default tunnel options at creation, then later need stronger algorithms and discover that modifying tunnel or connection options replaces the tunnel endpoints and interrupts connectivity.
Constraints:
You MUST set strong tunnel options (AES-256, SHA-256 or higher, Diffie-Hellman group 14 or higher) at create time, when changing them is free, rather than after the customer is in production
You MUST warn that modifying tunnel options later replaces the tunnel endpoints and briefly interrupts the connection
Troubleshooting
Connection created but traffic does not flow
Route propagation or the security group rule is missing. Confirm both (Creation order).
Connection never establishes on a virtual private gateway
The AWS-side and customer gateway ASNs match, or the gateway is not attached. Set distinct ASNs and attach (Distinct ASNs).
Customer waits for AWS to configure their device
The customer gateway resource is metadata only. The device configuration is the customer's separate step (The customer gateway is metadata only).
Customer needs more than 1.25 Gbps but built on a virtual private gateway
Large tunnels need a transit gateway. Rebuild the target gateway on a transit gateway (Decision).
Procedure
Overview
This procedure creates the customer gateway, the target gateway, the routing and security group configuration, and the VPN connection in the required order, then surfaces the console link to verify status and download the device configuration.
Parameters
region (required): The AWS Region of the VPC or transit gateway.
target_gateway_type (required):
vpn-gateway,transit-gateway,core-network, orvpn-concentrator. If the customer saysvpn-concentrator, redirect to the connecting-many-sites-with-a-vpn-concentrator reference.vpc_id (required for a virtual private gateway or transit gateway target): The VPC the gateway attaches to.
transit_gateway_id (required if using an existing transit gateway): The transit gateway the connection terminates on. If creating a new transit gateway, this is captured from the
create-transit-gatewayresponse in Step 3.customer_gateway_ip (required): The public IP address of the on-premises device.
routing_type (required):
staticordynamic, settled in the choosing-static-or-dynamic-routing reference.customer_gateway_asn (required): The BGP ASN of the customer gateway.
create-customer-gatewayalways requires--bgp-asn. For dynamic routing, use the real ASN of the on-premises device. For static routing, supply a placeholder (for example,65000).aws_side_asn (required when creating a new virtual private gateway or transit gateway): The BGP ASN for the AWS side, which must differ from
customer_gateway_asn. If the customer does not specify one, use the AWS default64512.subnet_ids (required for a transit gateway target): One subnet ID per Availability Zone for the transit gateway VPC attachment. Note: if the transit gateway VPC attachment already exists (managed by the transitgateway skill or another team), skip creating it in Step 3 and use the existing attachment.
Constraints for parameter acquisition:
You MUST ask for all required parameters upfront in a single prompt
You MUST confirm the routing type is already decided before building
Steps
1. Verify dependencies
Constraints:
You MUST confirm credentials with
aws sts get-caller-identityYou SHOULD recommend ephemeral IAM role-based credentials (instance profile, SSO session, or assumed role) rather than long-lived IAM user access keys for running these commands
You MUST confirm the VPC (or transit gateway) and the on-premises device public IP exist before building
2. Create the customer gateway
Constraints:
You MUST create the customer gateway describing the on-premises device:
aws ec2 create-customer-gateway --type ipsec.1 --public-ip {customer_gateway_ip} \ --bgp-asn {customer_gateway_asn} --region {region}If the customer's BGP ASN is larger than 2,147,483,647 (a 32-bit ASN), you MUST use
--bgp-asn-extendedinstead of--bgp-asn:aws ec2 create-customer-gateway --type ipsec.1 --public-ip {customer_gateway_ip} \ --bgp-asn-extended {customer_gateway_asn} --region {region}--bgp-asnaccepts values 1 to 2,147,483,647;--bgp-asn-extendedaccepts 2,147,483,648 to 4,294,967,295.You MUST capture the
CustomerGatewayIdfrom the response
3. Create or select the target gateway and attach it
Constraints:
You MUST create the chosen target gateway. For a virtual private gateway, create it and attach it to the VPC:
aws ec2 create-vpn-gateway --type ipsec.1 --amazon-side-asn {aws_side_asn} --region {region} aws ec2 attach-vpn-gateway --vpn-gateway-id {vpn_gateway_id} --vpc-id {vpc_id} --region {region}For a transit gateway, create it (or select an existing one) and attach it to the VPC. The VPN connection is associated with the transit gateway in Step 5; the VPC attachment carries VPN traffic into the VPC:
aws ec2 create-transit-gateway --options AmazonSideAsn={aws_side_asn} --region {region} aws ec2 create-transit-gateway-vpc-attachment --transit-gateway-id {transit_gateway_id} \ --vpc-id {vpc_id} --subnet-ids {subnet_ids} --region {region}You MUST set an AWS-side ASN distinct from the customer gateway ASN for a virtual private gateway
4. Enable routing and update the security group
Constraints:
You MUST enable route propagation on the subnet route table (or add static routes) so the subnet can reach the on-premises network
You MUST update the security group to permit the on-premises traffic
5. Create the VPN connection
Constraints:
You MUST create the connection against the target gateway and customer gateway, with the chosen routing type and tunnel options. For a virtual private gateway target, pass
--vpn-gateway-id; for a transit gateway target, pass--transit-gateway-idinstead:# Virtual private gateway target aws ec2 create-vpn-connection --type ipsec.1 --customer-gateway-id {customer_gateway_id} \ --vpn-gateway-id {vpn_gateway_id} \ --pre-shared-key-storage SecretsManager \ --options "StaticRoutesOnly={true_if_static},TunnelOptions=[{Phase1EncryptionAlgorithms=[{Value=AES256}],Phase2EncryptionAlgorithms=[{Value=AES256}],Phase1IntegrityAlgorithms=[{Value=SHA2-256}],Phase2IntegrityAlgorithms=[{Value=SHA2-256}],Phase1DHGroupNumbers=[{Value=14}],Phase2DHGroupNumbers=[{Value=14}]},{Phase1EncryptionAlgorithms=[{Value=AES256}],Phase2EncryptionAlgorithms=[{Value=AES256}],Phase1IntegrityAlgorithms=[{Value=SHA2-256}],Phase2IntegrityAlgorithms=[{Value=SHA2-256}],Phase1DHGroupNumbers=[{Value=14}],Phase2DHGroupNumbers=[{Value=14}]}]" \ --region {region} # Transit gateway target aws ec2 create-vpn-connection --type ipsec.1 --customer-gateway-id {customer_gateway_id} \ --transit-gateway-id {transit_gateway_id} \ --pre-shared-key-storage SecretsManager \ --options "StaticRoutesOnly={true_if_static},TunnelOptions=[{Phase1EncryptionAlgorithms=[{Value=AES256}],Phase2EncryptionAlgorithms=[{Value=AES256}],Phase1IntegrityAlgorithms=[{Value=SHA2-256}],Phase2IntegrityAlgorithms=[{Value=SHA2-256}],Phase1DHGroupNumbers=[{Value=14}],Phase2DHGroupNumbers=[{Value=14}]},{Phase1EncryptionAlgorithms=[{Value=AES256}],Phase2EncryptionAlgorithms=[{Value=AES256}],Phase1IntegrityAlgorithms=[{Value=SHA2-256}],Phase2IntegrityAlgorithms=[{Value=SHA2-256}],Phase1DHGroupNumbers=[{Value=14}],Phase2DHGroupNumbers=[{Value=14}]}]" \ --region {region}You MUST use
--pre-shared-key-storage SecretsManagerto store PSKs in AWS Secrets Manager so they are not returned as plain text in APIs likedescribe-vpn-connections; this incurs a small additional Secrets Manager cost per secretYou MUST set strong tunnel options (AES-256, SHA-256 or higher, Diffie-Hellman group 14 or higher) rather than the AES-128 / SHA-1 / DH group 2 minimums
You MUST supply two
TunnelOptionsobjects, one per tunnel, since every connection has two tunnels; a single-element array leaves Tunnel 2 on the weak AES-128 / SHA-1 / DH group 2 defaultsYou SHOULD enable Site-to-Site VPN logs at create time so tunnel establishment and BGP events are captured from the start; see the monitoring-and-troubleshooting-tunnels reference for setup
6. Confirm and surface the console link
Constraints:
You MUST confirm the connection and its tunnels reach the expected state:
aws ec2 describe-vpn-connections --vpn-connection-ids {vpn_connection_id} --region {region}You MUST present the VPN connection console link, filling
{region}and{vpnConnectionId}from the API response, and tell the customer to open it, confirm the connection, and download the device configuration:https://console.aws.amazon.com/vpc/home?region={region}#VpnConnectionDetails:VpnConnectionId={vpnConnectionId}
Example
Example input
{
"region": "us-east-1",
"target_gateway_type": "transit-gateway",
"vpc_id": "vpc-0abc1234def567890",
"subnet_ids": ["subnet-0abc1234def567890", "subnet-0fed9876cba543210"],
"aws_side_asn": 64512,
"customer_gateway_ip": "203.0.113.10",
"routing_type": "dynamic",
"customer_gateway_asn": 65010
}Example output
Created customer gateway (203.0.113.10, ASN 65010) and the VPN connection on the transit gateway,
dynamic routing. Route propagation enabled and the security group updated.
Open the VPN connection in the console, confirm both tunnels, and download the device configuration:
https://console.aws.amazon.com/vpc/home?region=us-east-1#VpnConnectionDetails:VpnConnectionId=vpn-0abc1234def567890Troubleshooting
Traffic does not flow after creation
Route propagation or the security group rule is missing. Confirm both (Step 4).
Connection never establishes on a virtual private gateway
ASNs match or the gateway is not attached. Set distinct ASNs and attach (Step 3).
Customer expects AWS to configure their device
The customer gateway is metadata. Hand off to the applying-the-customer-gateway-device-configuration reference.
Security Considerations
Creating the connection sets the authentication and encryption posture the tunnels run with, so the security choices belong at create time, when changing them is free.
Constraints:
You MUST treat tunnel pre-shared keys (PSKs) as secrets: never pass them on the command line or store them in plaintext, store them in AWS Secrets Manager, and rotate them periodically; where the device supports it, recommend certificate-based authentication with AWS Private Certificate Authority instead of a static PSK
You MUST set strong tunnel options (AES-256, SHA-256 or higher, Diffie-Hellman group 14 or higher) rather than the AES-128 / SHA-1 / DH group 2 minimums
You MUST scope the security group rule to the specific on-premises CIDR blocks and protocols the workload needs, not
0.0.0.0/0You SHOULD set up monitoring by following the monitoring-and-troubleshooting-tunnels reference, which covers CloudWatch tunnel-state alarms, VPN logs, and CloudTrail audit logging
You MUST enable encryption at rest on all log destinations (KMS on the CloudWatch Logs log groups holding the VPN/tunnel logs, and SSE-S3 or SSE-KMS on the S3 bucket holding the CloudTrail logs) since these logs can carry sensitive tunnel and connection details
Additional Resources
Get started with AWS Site-to-Site VPN (AWS Site-to-Site VPN User Guide)
Create an AWS Site-to-Site VPN connection (AWS Site-to-Site VPN User Guide)
AWS Site-to-Site VPN single and multiple VPN connection examples (AWS Site-to-Site VPN User Guide)
AWS Site-to-Site VPN customer gateway devices (AWS Site-to-Site VPN User Guide)
Tunnel options for your AWS Site-to-Site VPN connection (AWS Site-to-Site VPN User Guide)
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an MCP server
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- AWS
- Publisher
- AWS (Official)
- Source
- aws/agent-toolkit-for-aws · skills/specialized-skills/networking-and-content-delivery-skills/sitetositevpn · commit 0a218f8
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- NOTICE (added by AutoGineer from NOTICE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by AWS.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download sitetositevpn.zip