enabling-lambda-vpc-internet-access

作成者: aws

VPCサブネットにデプロイされたAWS Lambda関数に対して、NATゲートウェイインフラを作成し、パブリック/プライベートサブネットのルーティングを設定することで、インターネットアクセスを有効にします。

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill enabling-lambda-vpc-internet-access

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

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のその他のスキル

analyzing-release-readiness
aws
GitHub PR、GitLab MR、またはローカルブランチに対して、マージ前のリリース準備状況レビューをトリガーします。ユーザーがコード変更をリスク、正確性、…について分析したい場合に使用します。
scanning-with-aws-security-agent
aws
ワークスペースでAWS Security Agentスキャンを実行します — ソースをAWSにアップロードし、マネージドSecurity Agentサービスでスキャンし、ランク付けされ検証済みの…を返します。
coordinating-multi-space-devops-agent
aws
1つのClaude Codeセッションから、複数のAgentSpacesにわたってAWS DevOps Agentを調整します — 質問を適切なスペース(prod vs staging vs knowledge)にルーティングし、…
aws-security
aws
AWSセキュリティサービスとワークフローをカバー — Security Hub V2(OCSF)の検出結果、コネクタ、アグリゲータ、自動化ルール、セキュリティ態勢の要約;…
querying-aws-sagemaker-catalog
aws
SageMaker Catalogのアセットメタデータテーブル(Apache IcebergとしてS3 Tablesにエクスポート)に対してSQL分析を実行します。ガバナンスクエリ、アセット成長の追跡などをカバーします。
agents-connect
aws
エージェントをGateway経由で外部API、ツール、またはサービスに接続する場合、またはCedarポリシーでツールアクセスを制限する場合に使用します。ゲートウェイのセットアップ、ターゲット…
aurora-dsql
aws
Aurora DSQLクラスターのプロビジョニングと管理、psqlまたはDSQL Connectorsを介した接続、スキーマの管理、クエリの実行、MySQLからの移行、クエリプランの診断、…
transitgateway
aws
AWS Transit Gatewayを設定します:ハブを作成しVPCを接続し、ルートテーブルでトラフィックをセグメント化し、ハブを通じてegressとインスペクションを集中管理します…