A developer is configuring an AWS Lambda function inside a private subnet of a custom VPC to process messages from an Amazon SQS queue. The Lambda function must read database credentials from AWS Secrets Manager and write the processed results to an Amazon DynamoDB table. To satisfy security requirements, the VPC has no internet access, and all traffic must remain within the AWS network.
The developer creates a Gateway VPC endpoint for DynamoDB and an Interface VPC endpoint for Secrets Manager. However, when the Lambda function runs, it fails with connection timeout errors when attempting to access both DynamoDB and Secrets Manager.
Which combination of actions will resolve these connection timeouts? (Select two.)
- Update the route table associated with the Lambda function's private subnet to include a route that targets the DynamoDB Gateway VPC endpoint for the DynamoDB prefix list.Answer
- Modify the security group associated with the Secrets Manager Interface VPC endpoint to allow inbound HTTPS traffic on port 443 from the security group associated with the Lambda function.Answer
- CConfigure the security group associated with the Lambda function to allow inbound HTTPS traffic on port 443 from the Secrets Manager Interface VPC endpoint.
- DAdd a route to the route table of the Lambda function's private subnet that routes all traffic to the Secrets Manager Interface VPC endpoint as the target.
- EIncrease the visibility timeout of the SQS queue to be greater than the Lambda function's timeout, and configure the Lambda function's concurrency limit to match the SQS queue's batch size.
Answer
Update the route table associated with the Lambda function's private subnet to include a route that targets the DynamoDB Gateway VPC endpoint for the DynamoDB prefix list, and modify the security group associated with the Secrets Manager Interface VPC endpoint to allow inbound HTTPS traffic on port 443 from the security group associated with the Lambda function.
To resolve connection timeouts inside a private VPC with no internet access, the developer must properly configure the networking and security rules for the VPC endpoints. For the DynamoDB Gateway endpoint, a route must be added to the subnet's route table targeting the DynamoDB prefix list. For the Secrets Manager Interface endpoint, which uses ENIs, the endpoint's security group must be configured to accept inbound HTTPS (port 443) connections from the Lambda function's security group.
Step-by-Step Solution
Key Concept
AWS Lambda VPC networking using Gateway and Interface VPC endpoints
Estimated Time:3m 0s