A developer is configuring an AWS Lambda function to run inside a custom VPC. The function needs to retrieve database configuration parameters stored in AWS Systems Manager Parameter Store. The corporate security policy requires that no traffic to Systems Manager may traverse the public internet. During testing, the Lambda function times out whenever it attempts to call the GetParameter API. How should the developer resolve this issue while complying with the security policy?
- Create an interface VPC endpoint for Systems Manager in the VPC, and configure the security group of the VPC endpoint to allow inbound HTTPS traffic from the Lambda function's security group.Answer
- BAssociate the Lambda function with a public subnet in the VPC and add a route to the subnet's route table pointing to an Internet Gateway.
- CModify the trust policy of the Lambda function's execution role to allow the Systems Manager service principal to assume the role.
- DMigrate the configuration parameters to AWS Secrets Manager, enable automatic rotation, and configure a Gateway VPC Endpoint for Secrets Manager.
Answer
Create an interface VPC endpoint for Systems Manager in the VPC, and configure the security group of the VPC endpoint to allow inbound HTTPS traffic from the Lambda function's security group.
The correct answer correctly identifies that an interface VPC endpoint (AWS PrivateLink) allows resources inside private subnets to securely connect to Systems Manager over private IP addresses. It also correctly states that the security group of the VPC endpoint must permit inbound HTTPS traffic from the Lambda function's security group.
Step-by-Step Solution
Key Concept
VPC Security and PrivateLink Interface Endpoints for Lambda