PluginBench
Skill
Official
Pass
Audit score 90

connecting-vpcs-with-peering

aws/agent-toolkit-for-aws

Establish VPC peering connections with automatic route table and DNS configuration for both VPCs.

What is connecting-vpcs-with-peering?

Sets up private network connectivity between two VPCs using peering, handling CIDR validation, route table updates, DNS resolution, and security group guidance. Use this when creating or managing VPC peering across same-region, cross-region, or cross-account scenarios.

  • Validates CIDR overlap between VPCs to prevent conflicts
  • Creates and accepts VPC peering connections
  • Updates all route tables in both VPCs automatically
  • Configures DNS resolution for cross-VPC communication
  • Provides security group guidance for cross-VPC traffic
  • Supports same-region, cross-region, and cross-account peering

How to install connecting-vpcs-with-peering

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill connecting-vpcs-with-peering
Prerequisites
  • AWS credentials configured with permissions to create VPC peering connections and modify route tables
  • VPC IDs for both the requester and accepter VPCs
  • For cross-account peering: access to both AWS accounts
Claude Code
Cursor
Windsurf
Cline

How to use connecting-vpcs-with-peering

  1. 1.Gather the VPC IDs for both VPCs you want to connect
  2. 2.Verify that CIDR blocks do not overlap between the two VPCs
  3. 3.Run the skill with both VPC IDs as parameters
  4. 4.For cross-account peering, manually accept the connection from the accepter account if auto-accept is not enabled
  5. 5.Verify DNS resolution is enabled in both VPC settings
  6. 6.Test connectivity between instances in the peered VPCs using ping or similar tools

Use cases

Good for
  • Connecting microservices in separate VPCs for direct private communication
  • Establishing cross-account network connectivity for multi-tenant architectures
  • Linking VPCs across regions while maintaining private connectivity
  • Integrating legacy and new VPC environments without internet exposure
  • Setting up hub-and-spoke network topologies between VPCs
Who it's for
  • AWS network architects
  • DevOps engineers managing multi-VPC deployments
  • Cloud infrastructure teams
  • Solutions architects designing VPC connectivity

connecting-vpcs-with-peering FAQ

What is CIDR overlap and why does it matter?

CIDR overlap occurs when two VPCs have overlapping IP address ranges. This prevents peering because the routing tables cannot determine which VPC to send traffic to. The skill validates this before creating the connection.

Can I peer VPCs across different AWS regions?

Yes, the skill supports cross-region peering. Routes must be added in both regions and security groups must allow traffic from the peer VPC's CIDR blocks.

What happens if peering gets stuck in pending state?

Cross-account connections require manual acceptance from the accepter account. Same-account connections with auto-accept enabled should transition automatically. Check account permissions if stuck.

Do I need to manually update security groups?

The skill provides security group guidance, but you may need to manually adjust inbound rules to allow traffic from the peer VPC's CIDR blocks depending on your security requirements.

What if route creation fails?

Route creation typically fails if a route with the same destination CIDR already exists. You must replace the existing route instead of creating a new one.

Full instructions (SKILL.md)

Source of truth, from aws/agent-toolkit-for-aws.


name: connecting-vpcs-with-peering description: Establishes VPC peering connections between two VPCs for direct private network connectivity. Always use this skill when creating or managing VPC peering — it validates CIDR overlap, updates all route tables in both VPCs, configures DNS resolution, and provides security group guidance that are critical for correct connectivity. version: 1

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.

DNS resolution not working

Both VPCs must have DNS resolution and DNS hostnames enabled in their VPC settings, not just the peering connection options.

Cross-region connectivity issues

Verify routes are added in both regions and security groups allow traffic from the peer VPC's CIDR blocks.