AWS Certified Solutions Architect – Associate (SAA-C02) — Question 666
A company has an application that loads documents into an Amazon S3 bucket and converts the documents into another format. The application stores the converted documents in another S3 bucket and saves the document name and URLs in an Amazon DynamoDB table. The DynamoDB entries are used during subsequent days to access the documents. The company uses a DynamoDB Accelerator (DAX) cluster in front of the table.
Recently, traffic to the application has increased. Document processing tasks are timing out during the scheduled DAX maintenance window. A solutions architect must ensure that the documents continue to load during the maintenance window.
What should the solutions architect do to accomplish this goal?
Answer options
- A. Modify the application to write to the DAX cluster. Configure the DAX cluster to write to the DynamoDB table when the maintenance window is complete.
- B. Enable Amazon DynamoDB Streams for the DynamoDB table. Modify the application to write to the stream. Configure the stream to load the data when the maintenance window is complete.
- C. Convert the application to an AWS Lambda function. Configure the Lambda function runtime to be longer than the maintenance window. Create an Amazon CloudWatch alarm to monitor Lambda timeouts.
- D. Modify the application to write the document name and URLs to an Amazon Simple Queue Service (Amazon SQS) queue. Create an AWS Lambda function to read the SQS queue and write to DynamoDB.
Correct answer: D
Explanation
Using an Amazon SQS queue to buffer writes decouples the application's processing logic from the database's availability during maintenance windows. An AWS Lambda function can then consume messages from the SQS queue and write them to DynamoDB once the DAX cluster is available, preventing application timeouts. Other options do not provide an effective buffering mechanism or fail to handle the maintenance window length appropriately.