
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-codeInstalls 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- Exporting Rds To S36.5K
- Setting Up Cloudtrail Multi Region6.5K
- Routing Traffic With Route53 And Cloudfront6.5K
- Creating Amazon Aurora Db Cluster With Instances6.4K
- Troubleshooting Efs6.3K
- Aws Lambda Durable Functions6.2K
- Aws Lambda Managed Instances6.2K
- Aws Cleanrooms6.1K
- Aws Lambda Microvms6.1K
- Amazon Aurora Postgresql6K
- Querying Aws S36K
- Amazon Opensearch Service6K
- Aws Blocks5.9K
- Querying Aws Cloudwatch5.9K
- Amazon Elasticache5.9K
- Amazon Aurora Mysql5.7K
- Managing Amazon Msk5.5K
- Developing Applications On Managed Service For Apache Flink5.4K
- Creating Ec2 Image Builder Pipeline3.9K
- Aws Iam10.9K
- Aws Serverless10.9K
- Aws Observability10.7K
- Aws Containers10.1K
- Aws Cdk10.1K