aws sqs change-message-visibility-batch
Changes the visibility timeout of multiple messages. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To change multiple messages' timeout visibilities as a batch
The following change-message-visibility-batch example changes the 2 specified messages' timeout visibilities to 10 hours (10 hours * 60 minutes * 60 seconds).
aws sqs change-message-visibility-batch --queue-url https://sqs.us-west-2.amazonaws.com/80398EXAMPLE/MyQueue --entries file://change-message-visibility-batch.jsonIdentify--queue-urlThe URL of the Amazon SQS queue whose messages' visibility is changed.--entriesLists the receipt handles of the messages for which the visibility timeout must be changed.Contents of change-message-visibility-batch.json:
[
{
"Id": "FirstMessage",
"ReceiptHandle": "AQEBhz2q...Jf3kaw==",
"VisibilityTimeout": 36000
},
{
"Id": "SecondMessage",
"ReceiptHandle": "AQEBkTUH...HifSnw==",
"VisibilityTimeout": 36000
}
]
Its output
{
"Successful": [
{
"Id": "SecondMessage"
},
{
"Id": "FirstMessage"
}
]
}For more information, see Amazon SQS visibility timeout in the Amazon Simple Queue Service Developer Guide.
Options
--entriesLists the receipt handles of the messages for which the visibility timeout must be changed.--queue-urlThe URL of the Amazon SQS queue whose messages' visibility is changed.