SAP-C02 Question 531
Select 2A company is running an application on Amazon EC2 instances distributed across multiple Availability Zones (AZs) in a single AWS Region. The application communicates with an Amazon RDS database in the same region. The company is experiencing high data transfer costs and wants to optimize its architecture to reduce these costs. Which of the following solutions will help reduce data transfer costs while maintaining application performance?
- A
Enable VPC endpoints for the RDS database to route traffic within the AWS network.
- B
Ensure that the EC2 instances and the RDS database are in the same Availability Zone.
- C
Use AWS Direct Connect to establish a dedicated connection to the RDS database.
- D
Deploy a caching layer such as Amazon ElastiCache to reduce the frequency of database queries.
- E
Migrate the RDS database to another region with lower data transfer costs.
Show answer and explanation
Correct answers: B, D
Explanation
To optimize data transfer costs, it is essential to minimize or eliminate unnecessary inter-AZ or cross-region data transfers. Placing the EC2 instances and the RDS database in the same Availability Zone avoids inter-AZ costs. Additionally, implementing a caching layer reduces the volume of traffic sent to the RDS database, further optimizing data transfer costs. Other options, like using VPC endpoints or Direct Connect, do not address the specific problem of reducing intra-region data transfer costs.
- A. Incorrect.
Incorrect: VPC endpoints are used to privately connect to services like Amazon S3 or DynamoDB over the AWS network but do not apply to RDS. RDS communication within the same VPC already uses the AWS private network.
- B. Correct.
Correct: Placing the EC2 instances and the RDS database in the same Availability Zone eliminates inter-AZ data transfer costs for traffic between the application and the database.
- C. Incorrect.
Incorrect: AWS Direct Connect is used to establish a dedicated connection between an on-premises network and AWS, which doesn’t apply to reducing data transfer costs within a VPC.
- D. Correct.
Correct: Using a caching layer such as Amazon ElastiCache reduces the number of queries sent to the RDS database, thereby indirectly reducing data transfer costs.
- E. Incorrect.
Incorrect: Migrating the RDS database to another region introduces cross-region data transfer costs, which are typically higher than intra-region costs.