aws avatar

Enabling Lambda Vpc Internet Access

If your VPC Lambda can't reach the internet, this walks you through the NAT Gateway setup you need. It covers creating the NAT infrastructure, splitting public and private subnets, configuring route tables with the 0.0.0.0/0 routes, and fixing security groups. The troubleshooting section is helpful for the usual gotchas like route table associations and the 1-2 minute propagation delay that catches everyone. This is pretty focused on one specific problem, which is good because VPC networking has enough moving parts that having the exact procedure referenced beats trying to remember whether the route goes in the public or private subnet route table.

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 enabling-lambda-vpc-internet-access --agent claude-code

Installs into .claude/skills of the current project.

Files

Enabling Lambda VPC Internet Access

Overview

Domain expertise for enabling internet access from AWS Lambda functions running inside VPC private subnets. Lambda functions in a VPC cannot receive public IP addresses, so outbound internet access requires NAT Gateway infrastructure that routes traffic from private subnets through a public subnet to an Internet Gateway.

Enable internet access for a VPC Lambda function

To set up NAT Gateway infrastructure and configure routing for a Lambda function that needs internet access, follow the procedure exactly. See Lambda VPC internet access setup procedure.

Troubleshooting

NAT Gateway not working

Verify the route table associated with the Lambda subnets has a 0.0.0.0/0 route pointing to the NAT Gateway. See the full procedure for details.

Lambda function timeout

Check that security group outbound rules allow the necessary ports and that both the NAT Gateway and Internet Gateway are properly configured.

Network changes not taking effect

Sponsors

Details

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

More from aws/agent-toolkit-for-aws

All 56
1aws avataramazon-aurora-mysqlaws/agent-toolkit-for-awsAmazon Aurora MySQL — creates, modifies, and advises on Aurora MySQL clusters specifically (MySQL-compatible engine, Aurora serverless, parallel query). Trigger5.7Kskills.sh installs
2affaan-m avatarmcp-server-patternsaffaan-m/eccBuild MCP servers with Node/TypeScript SDK — tools, resources, prompts, Zod validation, stdio vs Streamable HTTP. Use Context7 or official MCP docs for latest A5.6Kskills.sh installs
3affaan-m avatarx-apiaffaan-m/eccX/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native co5.4Kskills.sh installs
4wordpress avatarwp-abilities-apiwordpress/agent-skillsUse when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, /wp-json/wp-abilities/v1/*, @wordpress/abilities) includin4.6Kskills.sh installs
5agricidaniel avatarads-server-side-trackingagricidaniel/claude-adsAudit server-side paid-media measurement including server-side tag management, platform conversion APIs, event taxonomy, browser/server deduplication, consent, 3.6Kskills.sh installs
6affaan-m avatarpubmed-databaseaffaan-m/eccDirect PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitori3.3Kskills.sh installs