AWS Certified Solutions Architect – Associate (SAA-C02) — Question 52
A company hosts an application on multiple Amazon EC2 instances. The application processes messages from an Amazon SQS queue, writes for 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
- A. Use the CreateQueue API call to create a new queue.
- B. Use the AddPermission API call to add appropriate permissions.
- C. Use the ReceiveMessage API call to set an appropriate wait time.
- D. Use the ChangeMessageVisibility API call to increase the visibility timeout.
Correct answer: D
Explanation
The correct answer is D because increasing the visibility timeout allows the message to be hidden for a longer period while it is being processed, reducing the chances of it being processed multiple times. The other options do not directly address the issue of message duplication during processing and do not provide a solution to ensure that each message is only handled once.