- Newest
- Most votes
- Most comments
To verify the functionality of your DynamoDB gateway endpoint and ensure that data is indeed staying within the AWS network, you can follow these steps:
-
Check the route table associated with your VPC subnets: Ensure that there's a route for the DynamoDB service prefix list (pl-xxxxxxxx) pointing to the gateway endpoint (vpce-xxxxxxxx).
-
Use the 'nslookup' or 'dig' command from an EC2 instance within your VPC to resolve the DynamoDB endpoint (dynamodb.us-west-2.amazonaws.com). It's normal to see a public IP address in the result, as gateway endpoints use public IP addresses for routing.
-
To confirm that traffic is actually using the gateway endpoint, you can use VPC Flow Logs. Enable flow logs for your VPC and analyze the traffic. You should see traffic to DynamoDB's IP addresses, but the source and destination will be private IP addresses within your VPC CIDR range.
-
Use the AWS CLI to test the connection to DynamoDB from within your VPC. Run a simple command like 'aws dynamodb list-tables' from an EC2 instance in your VPC. If it succeeds, it's using the gateway endpoint.
-
Monitor CloudWatch metrics for your gateway endpoint. Look for metrics like "BytesIn" and "BytesOut" to confirm that traffic is flowing through the endpoint.
-
You can also use AWS Reachability Analyzer to create and analyze a path between your Lambda function (or an EC2 instance in the same subnets) and DynamoDB. This will show you the exact path the traffic takes, confirming it goes through the gateway endpoint.
By following these steps, you can demonstrate to your client that the data is indeed staying within the AWS network, even though the DNS resolution shows a public IP. The key is that the routing occurs at the VPC level, directing traffic through the gateway endpoint rather than over the public internet.
Sources
Troubleshoot connection to AWS service endpoints from Linux | AWS re:Post
Infrastructure security in Amazon DynamoDB - Amazon DynamoDB
Getting started with Reachability Analyzer using the AWS CLI - Amazon Virtual Private Cloud
Relevant content
- AWS OFFICIALUpdated 7 months ago