AWS Certified Solutions Architect - Associate / Question #1061 of 1019

Question #1061

A company operates a high-availability data analytics application on Amazon EC2 instances within a single VPC. The instances are distributed across multiple subnets in different Availability Zones. These EC2 instances do not communicate with each other but frequently retrieve data from and store results in Amazon DynamoDB via a single NAT gateway. The company is seeking to minimize data transfer costs associated with this setup.

What is the MOST cost-effective solution to reduce Regional data transfer charges?

A

Deploy a NAT gateway in each Availability Zone.

B

Replace the NAT gateway with a NAT instance.

C

Create a gateway VPC endpoint for DynamoDB.

D

Use EC2 Dedicated Hosts for the instances.

Explanation

The most cost-effective solution is C. Create a gateway VPC endpoint for DynamoDB. Here's why:

- Option C: A VPC gateway endpoint enables private connectivity between the VPC and DynamoDB without requiring internet access, NAT devices, or VPN. Data transferred via the endpoint incurs no additional charges, reducing Regional data transfer costs associated with NAT gateways.

- Why other options are incorrect:
- A: Deploying NAT gateways in each AZ increases costs (hourly charges per NAT gateway) and does not eliminate NAT data transfer fees.
- B: NAT instances still incur data transfer costs and require management, making them less cost-effective than VPC endpoints.
- D: EC2 Dedicated Hosts are unrelated to data transfer costs and are used for licensing/compliance, not network optimization.

Key Points:
- VPC gateway endpoints bypass NAT for AWS services like DynamoDB/S3, reducing data transfer costs.
- NAT gateways charge for data processing and cross-AZ traffic.
- Always consider VPC endpoints when accessing AWS services from private subnets to minimize costs.

Answer

The correct answer is: C