An organization runs an application on Amazon EC2 instances in a private VPC subnet. The application frequently reads and writes data to an Amazon DynamoDB table. A SysOps Administrator notices a significant increase in NAT Gateway data processing charges. To eliminate these charges, the administrator deploys a Gateway VPC Endpoint for Amazon DynamoDB within the VPC. However, monitoring tools reveal that the EC2 instances are still routing all DynamoDB traffic through the NAT Gateway. Which of the following is the most likely cause of this behavior?
- AThe security group associated with the DynamoDB gateway endpoint does not allow inbound HTTPS traffic on port from the EC2 instances.
- BThe administrator did not manually add a route to the private subnet's route table pointing to the gateway endpoint's Elastic Network Interface ID as the target.
- CPrivate DNS hostnames were not enabled on the DynamoDB gateway endpoint, preventing the EC2 instances from resolving the DynamoDB endpoint to a private IP address.
- The route table associated with the private subnet was not selected during the gateway endpoint configuration, preventing the DynamoDB prefix list route from being automatically added.Answer
Answer
The route table associated with the private subnet was not selected during the gateway endpoint configuration, preventing the DynamoDB prefix list route from being automatically added.
The correct option is that the private subnet's route table was not selected during the gateway endpoint configuration. Gateway VPC Endpoints function by automatically adding a route to the associated route tables. This route maps the prefix list of the destination service (e.g., DynamoDB) to the VPC endpoint ID. If the private subnet's route table is not selected during creation or update, the route is not added, and traffic continues to route through the default path (the NAT Gateway).
Step-by-Step Solution
Key Concept
Gateway VPC Endpoints route traffic using subnet route tables and prefix lists, without utilizing Elastic Network Interfaces, security groups, or private DNS settings.