AWS Certified Solutions Architect – Associate (SAA-C03) — Question 249
A company has an API that receives real-time data from a fleet of monitoring devices. The API stores this data in an Amazon RDS DB instance for later analysis. The amount of data that the monitoring devices send to the API fluctuates. During periods of heavy traffic, the API often returns timeout errors.
After an inspection of the logs, the company determines that the database is not capable of processing the volume of write traffic that comes from the API. A solutions architect must minimize the number of connections to the database and must ensure that data is not lost during periods of heavy traffic.
Which solution will meet these requirements?
Answer options
- A. Increase the size of the DB instance to an instance type that has more available memory.
- B. Modify the DB instance to be a Multi-AZ DB instance. Configure the application to write to all active RDS DB instances.
- C. Modify the API to write incoming data to an Amazon Simple Queue Service (Amazon SQS) queue. Use an AWS Lambda function that Amazon SQS invokes to write data from the queue to the database.
- D. Modify the API to write incoming data to an Amazon Simple Notification Service (Amazon SNS) topic. Use an AWS Lambda function that Amazon SNS invokes to write data from the topic to the database.
Correct answer: C
Explanation
Option C is correct because using Amazon SQS allows for decoupling the API from the database, effectively managing write traffic by queuing requests and ensuring data is not lost during high load. Option A merely increases resources without addressing the connection issue. Option B does not reduce connections and may lead to higher complexity. Option D introduces SNS, which is less suited for the requirement of reliable message queuing compared to SQS.