Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aws/agent-toolkit-for-aws --skill enabling-lambda-vpc-internet-access -a claude-code
Open on GitHub

What 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/0 route 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/0 route 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-code

2Manually: put the files in place

~/.claude/skills/enabling-lambda-vpc-internet-access/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/enabling-lambda-vpc-internet-access/

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

Similar skills

All skills for Cloud: AWS, Azure, GCP →

From the same set137

setting-up-cloudtrail-multi-region Configures a multi-region AWS CloudTrail trail with S3 storage and CloudWatch Logs streaming. Useful for centralizing API audit logs and running security queries. CX Codex +1 6,100installs exporting-rds-to-s3 Walks the agent through exporting an RDS or Aurora snapshot to S3 as Parquet, from IAM roles and KMS encryption to task monitoring and data checks. CX Codex +1 6,100installs signing-in-to-aws Walks the agent through signing in to AWS from your local shell: version check, aws login once you confirm, then an identity check on the result. CX Codex +1 6,100installs connecting-vpcs-with-peering Sets up VPC peering connections between two VPCs for private network connectivity. It checks for CIDR overlap, updates route tables, and configures DNS resolution. CX Codex +1 6,100installs troubleshooting-efs A skill that walks the agent through Amazon EFS failures: mount errors, NFS timeouts, access denied, slow throughput. CX Codex +1 5,900installs aws-deployment Walks your coding agent through AWS CI/CD: CodePipeline, CodeBuild, CodeDeploy, CodeConnections, CodeArtifact. Useful when a pipeline stalls at source or a build hangs in a VPC. CX Codex +1 5,800installs aws-networking Routes AWS networking requests across seven services to their specialized implementation skills. It helps choose between connectivity and traffic filtering options. CX Codex +1 5,900installs aws-cleanrooms Walks your agent through AWS Clean Rooms permission failures and missing CloudWatch logs for custom ML model jobs. CX Codex +1 5,700installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor