What should a solutions architect do to ensure messages are being processed once only?
Use the CreateQueue API call to create a new queue.
Use the AddPermission API call to add appropriate permissions.
Use the ReceiveMessage API call to set an appropriate wait time.
Use the ChangeMessageVisibility API call to increase the visibility timeout.
Explanations:
Creating a new queue does not address the issue of processing messages exactly once. It does not prevent duplicate records from being created in the RDS table.
Adding permissions does not relate to ensuring that messages are processed once. Permissions affect access control rather than message handling and processing.
Setting an appropriate wait time with the ReceiveMessage API call influences how long the API waits for messages but does not impact the duplication of processed records in RDS.
Increasing the visibility timeout with the ChangeMessageVisibility API call allows more time for processing a message before it becomes visible to other consumers, reducing the chance of duplicate processing due to multiple instances picking up the same message. This is a strategy to ensure messages are processed only once.