Skip to content

VPC connectivity for Lambda Managed Instances

Functions on LMI run in your VPC. You still need a deliberate path for outbound access: other AWS services (for example S3, DynamoDB), CloudWatch Logs, and X-Ray telemetry. Without it, those calls fail even when IAM allows them.

For step-by-step console flows and IPv4/IPv6 variants, use Networking for Lambda Managed Instances as the product reference.

PatternIdeaTypical trade-off
Public subnet + internet gatewayInstances reach the internet directly (IPv4 and/or IPv6; egress-only IPv6 if you want outbound-only)Simple and low cost; mind inbound exposure if anything is truly public
VPC endpointsPrivate attachment to supported AWS services; traffic stays on the AWS networkStrong isolation; per-endpoint and per-AZ cost; plan HA across AZs
Private subnet + NAT gatewayPrivate workloads; outbound IPv4 via NAT in a public subnetCommon enterprise shape; NAT hourly and data charges; IPv4-oriented
If you prioritise…Lean toward…
Speed and cost for experimentsPublic subnet + IGW (with tight security groups)
Production isolation from the public internetVPC endpoints for AWS APIs you use, and/or private subnets + NAT for general egress
No inbound from the internetPrivate + NAT, or public subnet with controls; IPv6 egress-only IGW if IPv6 fits your services

Subnet choice, route tables, security groups, and endpoint policies are part of capacity provider placement — see Placement & capacity.