AWS Certified Solutions Architect – Associate (SAA-C03) — Question 79

A company hosts an application on multiple Amazon EC2 instances. The application processes messages from an Amazon SQS queue, writes to an Amazon RDS table, and deletes the message from the queue. Occasional duplicate records are found in the RDS table. The SQS queue does not contain any duplicate messages.
What should a solutions architect do to ensure messages are being processed once only?

Answer options

Correct answer: D

Explanation

The correct answer is D because increasing the visibility timeout allows the message to remain hidden from other consumers while it is being processed, reducing the chance of it being processed multiple times. The other options do not directly address the issue of ensuring messages are processed only once, as creating a new queue or adding permissions does not impact message visibility during processing.