Other Articles

SQS Queue – Monitor Message Visibility

This check ensures that the visibility timeout for Amazon SQS queues is properly configured. A correct visibility timeout prevents messages from being processed multiple times and helps ensure reliable message handling.

Check Details

  • Resource: SQS Queue
  • Check: Monitor SQS message visibility timeout
  • Risk: Messages may be processed multiple times or lost due to incorrect timeout configuration

Remediation via AWS Console

  1. Log in to the AWS Management Console and open the Amazon SQS console. Amazon SQS Console
  2. Click Queues and select the required SQS queue. SQS queues list
  3. Click Edit.
  4. Under Details, set the Default visibility timeout to a value between 30 and 300 seconds. SQS visibility timeout setting
  5. Click Save.

Remediation via AWS CLI

  1. Log in to the AWS Management Console and click the CloudShell icon (>_) in the top-right corner. AWS CloudShell
  2. Set the visibility timeout for the SQS queue:
    
    
    aws sqs set-queue-attributes \
     --queue-url <queue-url> \
     --attributes VisibilityTimeout=30
    

Replace <queue-url> with the actual SQS queue URL.