DBS-C01 · Question #359
A company has a hybrid environment in which a VPC connects to an on-premises network through an AWS Site-to-Site VPN connection. The VPC contains an application that is hosted on Amazon EC2…
The correct answer is D. Create a VPC endpoint for DynamoDB. Assign the endpoint to the route table of the private. To securely access Amazon DynamoDB from EC2 instances in private subnets, a VPC endpoint for DynamoDB should be created and configured in the private subnet's route table.
Question
A company has a hybrid environment in which a VPC connects to an on-premises network through an AWS Site-to-Site VPN connection. The VPC contains an application that is hosted on Amazon EC2 instances. The EC2 instances run in private subnets behind an Application Load Balancer (ALB) that is associated with multiple public subnets. The EC2 instances need to securely access an Amazon DynamoDB table. Which solution will meet these requirements?
Options
- AUse the internet gateway of the VPC to access the DynamoDB table. Use the ALB to route the
- BAdd a NAT gateway in one of the public subnets of the VPC. Configure the security groups of the
- CUse the Site-to-Site VPN connection to route all DynamoDB network traffic through the on-
- DCreate a VPC endpoint for DynamoDB. Assign the endpoint to the route table of the private
How the community answered
(57 responses)- A12% (7)
- B7% (4)
- C4% (2)
- D77% (44)
Why each option
To securely access Amazon DynamoDB from EC2 instances in private subnets, a VPC endpoint for DynamoDB should be created and configured in the private subnet's route table.
Using an internet gateway would expose DynamoDB traffic to the public internet, which is less secure, and private subnet instances cannot directly use an internet gateway for outbound connections without a NAT device. The ALB is for inbound traffic to EC2, not outbound from EC2.
While a NAT Gateway enables outbound internet access for private instances, accessing DynamoDB via its public endpoint through a NAT Gateway is not as secure or private as using a VPC endpoint, as the traffic would still be routed publicly within the AWS network.
Routing DynamoDB traffic (an AWS service) through an on-premises network via a Site-to-Site VPN is an inefficient and impractical approach, introducing unnecessary latency and complexity.
Creating a Gateway VPC endpoint for DynamoDB allows EC2 instances in private subnets to access DynamoDB directly and securely without traversing the public internet or requiring a NAT Gateway. This private connection is achieved by adding an entry to the private subnet's route table that directs all traffic destined for DynamoDB through the VPC endpoint, keeping the traffic within the Amazon network.
Concept tested: Secure private access to AWS services from private subnets using VPC Endpoints
Source: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/vpc-endpoints-dynamodb.html
Topics
Community Discussion
No community discussion yet for this question.