AWS Certified Developer – Associate (DVA-C02) — Question 459

A developer needs to configure an AWS Lambda function to make HTTP POST requests to an internal application. The application is in the same AWS account that hosts the function. The internal application runs on Amazon EC2 instances in a private subnet within a VPC.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

To allow an AWS Lambda function to access resources inside a private VPC subnet, you must configure the function to access the VPC by specifying the VPC and the private subnet ID. This configuration enables Lambda to create Elastic Network Interfaces (ENIs) inside the subnet to route traffic to the EC2 instances. Other options like configuring a VPN connection or modifying VPC route tables with Lambda IP addresses are incorrect because Lambda does not support these methods for VPC access.