A developer is configuring an AWS Lambda function to run inside a private subnet of a custom VPC. The function must retrieve configuration parameters from Systems Manager Parameter Store and send trace data to AWS X-Ray. Due to strict compliance guidelines, the VPC does not have a NAT Gateway or an Internet Gateway. Which two configurations must the developer implement to enable this connectivity? (Select TWO.)
- Create an interface VPC endpoint for Systems Manager (com.amazonaws.region.ssm) and associate it with the private subnets.Cevap
- Create an interface VPC endpoint for AWS X-Ray (com.amazonaws.region.xray) and associate it with the private subnets.Cevap
- CProvision a NAT Gateway inside the private subnet, and update the private subnet's route table to direct 0.0.0.0/0 traffic to it.
- DConfigure the Lambda function to retrieve values from AWS Secrets Manager using a gateway VPC endpoint.
- EUpdate the trust policy of the Lambda function's IAM execution role to trust the VPC endpoint service principal.
Cevap
Create interface VPC endpoints for Systems Manager (com.amazonaws.region.ssm) and AWS X-Ray (com.amazonaws.region.xray) and associate them with the private subnets.
Because the Lambda function is deployed inside a private subnet without internet egress (no NAT Gateway or Internet Gateway), it cannot resolve and reach the public API endpoints of Systems Manager and AWS X-Ray. Implementing interface VPC endpoints (AWS PrivateLink) creates private elastic network interfaces (ENIs) with private IP addresses directly inside the private subnet. This routes traffic privately to the specified AWS services without exposing data to the public internet.
Adım Adım Çözüm
Anahtar Kavram
AWS PrivateLink and Interface VPC Endpoints for private AWS service communication