enabling-lambda-vpc-internet-access — Claude Code skill: internet
A skill that walks the agent through NAT Gateway, route tables and security groups when a Lambda in a private subnet cannot reach the internet.
npx skills add aws/agent-toolkit-for-aws --skill enabling-lambda-vpc-internet-access -a claude-codeWhat enabling-lambda-vpc-internet-access does
A Lambda function inside a VPC gets no public IP, so outbound traffic has to go private subnet → public subnet → Internet Gateway through a NAT Gateway. The skill lays out that path and drives the agent through the setup steps.
Inside is a procedure for creating the NAT Gateway, editing route tables and updating security groups, plus a troubleshooting section. When the NAT Gateway seems dead, the check is the 0.0.0.0/0 route in the route table tied to the Lambda subnets. On a function timeout, look at security group outbound rules and both gateways.
VPC networking changes take 1–2 minutes to propagate, so testing right after creating a NAT Gateway tells you nothing. Another common miss: the function's subnets sit on a different route table, one without the NAT route.
What it helps with
- give a Lambda in a private subnet outbound internet access
- create a NAT Gateway and attach it to the right route table
- add a
0.0.0.0/0route for the function's subnets - debug Lambda timeouts on calls to external APIs
- check outbound security group rules on a VPC-attached function
Example prompts for the agent
- My Lambda in a private subnet can't reach an external API, set up a NAT Gateway for it
- Check the route table for my Lambda subnets — is there a
0.0.0.0/0route to the NAT - The VPC function keeps timing out, look at the security group and the gateways
How to install enabling-lambda-vpc-internet-access
1Skills CLI (Vercel)
npx skills add aws/agent-toolkit-for-aws --skill enabling-lambda-vpc-internet-access -a claude-code2Manually: put the files in place
~/.claude/skills/enabling-lambda-vpc-internet-access/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/enabling-lambda-vpc-internet-access/
1Skills CLI (Vercel)
npx skills add aws/agent-toolkit-for-aws --skill enabling-lambda-vpc-internet-access -a codex2Manually: put the files in place
.agents/skills/enabling-lambda-vpc-internet-access/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aws/agent-toolkit-for-aws --skill enabling-lambda-vpc-internet-access -a cursor2Manually: put the files in place
.cursor/skills/enabling-lambda-vpc-internet-access/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aws/agent-toolkit-for-aws enabling-lambda-vpc-internet-access2Manually: put the files in place
.github/skills/enabling-lambda-vpc-internet-access/SKILL.md1Skills CLI (Vercel)
npx skills add aws/agent-toolkit-for-aws --skill enabling-lambda-vpc-internet-access -a gemini-cli2Platform CLI
gemini skills install https://github.com/aws/agent-toolkit-for-aws --path skills/specialized-skills/networking-and-content-delivery-skills/enabling-lambda-vpc-internet-accessManually: put the files in place
.devin/skills/enabling-lambda-vpc-internet-access/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aws/agent-toolkit-for-aws --skill enabling-lambda-vpc-internet-access -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about enabling-lambda-vpc-internet-access
How do I install enabling-lambda-vpc-internet-access in Claude?
Run npx skills add aws/agent-toolkit-for-aws --skill enabling-lambda-vpc-internet-access -a claude-code. The skill lands at ~/.claude/skills/enabling-lambda-vpc-internet-access/SKILL.md.
What does enabling-lambda-vpc-internet-access do?
It guides the setup of internet access for Lambda functions in VPC private subnets: NAT Gateway, routing between public and private subnets, and security group rules.
Why don't my network changes take effect right away?
VPC networking changes can take 1–2 minutes to propagate. After creating a NAT Gateway or updating route tables, wait before testing the function.
Source text
SKILL.md · Apache-2.0
--- name: enabling-lambda-vpc-internet-access description: Enables internet access for AWS Lambda functions deployed in VPC subnets by creating NAT Gateway infrastructure, configuring public/private subnet routing, and updating security groups. Use when a VPC-attached Lambda function cannot reach the internet. version: 1 --- # 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](references/lambda-vpc-internet-access.md). ## 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 VPC networking changes can take 1–2 minutes to propagate. Wait before testing after creating a NAT Gateway or updating route tables. ### Route table association issues Confirm the Lambda function's subnets are associated with the route table that has the `0.0.0.0/0` route to the NAT Gateway.
© aws · Apache-2.0 · aws/agent-toolkit-for-aws