Change the visibility of a message

Give a consumer more time for a received message, or release it to the queue at once.

Last updated 18 November 2026View as Markdown

Replace my-queue with the name of your queue and receipt-handle with the receipt handle of the message's latest receive. The new timeout counts from now, 0 to 43,200 seconds (12 hours); 0 makes the message receivable again at once.

Prerequisites

  • Permission for queue:ChangeMessageVisibility on the queue. In the console you also need queue:ReceiveMessage to poll for the message; without queue:ChangeMessageVisibility, Release is unavailable.
  • In the console, also queue:GetQueueAttributes to open the queue's page (without it the page is not found).
  • The message is in flight under that receipt handle: no one has received it since, and its visibility timeout has not ended.

Change the visibility

The console only releases a message:

  1. Open the queue, then choose Send and receive.
  2. Under Receive messages, choose Poll for messages.
  3. On the message, choose Release.

The message leaves the list and can be received again at once.

Result

The message stays hidden for the new timeout, counted from now; with 0 it can be received again at once. Its receipt handle still deletes it until it is received again. A further change with the same handle works only while the message is still hidden: once its timeout has ended, or after a change to 0, the change is refused with MessageNotInflight.

When the change is refused

  • 400 with code MessageNotInflight: "The message is not in flight under this receipt — it was deleted, became visible again, or was received by someone else."
  • 400 "That is not a receipt handle."
Did this page help you?