aws avatar

Connecting Vpcs With Peering

This handles the full VPC peering workflow so you don't have to remember all the steps. It validates CIDR overlap before creating the connection, updates route tables in both VPCs automatically, and configures DNS resolution options. The real value is that it covers same-region, cross-region, and cross-account scenarios with a single procedure instead of making you hunt through AWS docs for each case. One catch: cross-account peering still needs manual acceptance from the other side, but it'll handle the auto-accept for same-account setups. Saves you from the common mistake of forgetting to enable DNS hostnames at the VPC level.

skills.sh installs
6.5K
GitHub stars
3.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add aws/agent-toolkit-for-aws --skill connecting-vpcs-with-peering --agent claude-code

Installs into .claude/skills of the current project.

Files

Connecting VPCs with Peering

Overview

Domain expertise for establishing private network connectivity between two VPCs using VPC peering. Covers the full lifecycle: creating the peering connection, accepting it, updating route tables in both VPCs, configuring DNS resolution, and adjusting security groups for cross-VPC traffic. Supports same-region, cross-region, and cross-account peering scenarios.

Create a VPC peering connection

To establish a VPC peering connection between two VPCs, follow the procedure exactly. See VPC peering connection procedure.

The procedure requires the requester and accepter VPC IDs at minimum. It validates both VPCs exist, checks for CIDR overlap, creates and accepts the peering, updates all route tables, and configures DNS resolution.

Troubleshooting

Peering stuck in pending state

Cross-account connections require manual acceptance from the accepter account. Same-account connections with auto_accept: true should transition automatically.

Route creation fails

Check for existing routes with the same destination CIDR. Replace existing routes instead of creating new ones.

Sponsors

Details

Repository
github.com/aws/agent-toolkit-for-aws
Categories
Security, AI & Agent Building, Cloud & Infrastructure
First seen
Jun 3, 2026

More from aws/agent-toolkit-for-aws

All 56

Recommended

More Security
1aws avatarenabling-lambda-vpc-internet-accessaws/agent-toolkit-for-awsEnables internet access for AWS Lambda functions deployed in VPC subnets by creating NAT Gateway infrastructure, configuring public/private subnet routing, and 6.5Kskills.sh installs
2aws avatarexporting-rds-to-s3aws/agent-toolkit-for-awsExports Amazon RDS or Aurora database snapshots to Amazon S3 in Apache Parquet format for analytics, backup, or data migration. Handles snapshot selection or cr6.5Kskills.sh installs
3trailofbits avatarinsecure-defaultstrailofbits/skillsDetects fail-open insecure defaults (hardcoded secrets, weak auth, permissive security) that allow apps to run insecurely in production. Use when auditing secur6.5Kskills.sh installs
4aws avatarsetting-up-cloudtrail-multi-regionaws/agent-toolkit-for-awsEnables a multi-region AWS CloudTrail trail with S3 log storage, CloudWatch Logs integration, and CloudWatch Logs Insights queries for security monitoring and c6.5Kskills.sh installs
5affaan-m avatarpostgres-patternsaffaan-m/eccPostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.6.3Kskills.sh installs
6wordpress avatarwp-rest-apiwordpress/agent-skillsUse when building, extending, or debugging WordPress REST API endpoints/routes: register_rest_route, WP_REST_Controller/controller classes, schema/argument vali6.3Kskills.sh installs