asked 59.1k views
3 votes
Can Lambda functions in a VPC also be able to access the internet and AWS Service endpoints?

asked
User MrBar
by
7.8k points

1 Answer

6 votes

Final answer:

Lambda functions in a VPC can access the internet and AWS Service Endpoints. A configuration involving a NAT gateway or instance is required for internet access, while VPC Endpoints enable private connections to AWS services without internet connectivity.

Step-by-step explanation:

Yes, Lambda functions within an Amazon Virtual Private Cloud (VPC) can access both the internet and AWS Service Endpoints. For internet access, the Lambda function must be configured with a VPC that has a NAT gateway or NAT instance to route traffic to the internet. Without this, while the Lambda function can communicate with resources within the VPC, it will not have internet access. To connect to AWS services, you can use VPC Endpoints which allow private connections between the VPC and supported AWS services without requiring an internet gateway, NAT device, VPN connection, or AWS Direct Connect connection. VPC Endpoints are essentially a feature in Amazon VPC that enables you to privately connect your VPC to supported AWS services and VPC endpoint services.

answered
User Tatiana
by
8.6k points