CmdID

CmdID / aws / aws sqs

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

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

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

2 in the AWS CLI reference
--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.