The GET on Message action (also called peeking on a message) returns the specified message regardless of the VisibilityTimeout state of the queue or message. This action doesn't modify the message's current visibility state or visibility timeout setting. See Visibility Timeout for more information.
The following table lists the special request parameters the action uses (in addition to the common request headers listed in Common REST Headers).
| Name | Description | Required |
|---|---|---|
| The message ID of the message to return. Type: String | Yes |
The following table lists the response elements the action returns (in addition to the common response elements listed in The Structure of a Response).
| Name | Description |
|---|---|
| An element containing information about the message. See the example below. Ancestor: Child: |
| The message's contents. Type: String Ancestor: |
| The message's system-assigned ID. Type: String Ancestor: |
The following table lists the special errors the action returns (in addition to the common errors listed in Common Errors).
| Error | Description | HTTP Status Code |
|---|---|---|
MessageNotFound | No message exists with the | 404 |
The following example REST request returns the message specified by the message ID.
![]() | Important |
|---|---|
When specifying a queue when using the REST API, make sure to omit |
GET /A29E9WXPHGOG29/queue1/17VXQHSGX0SG4ZEPPK7R%7C0QE42ST4KW7RK9HSY074%7C0Z4AN912X0H2EP8BV6XJ HTTP/1.1 Host: queue.amazonaws.com Authorization: [AWS authentication string] AWS-Version: 2007-05-01 Content-Type: text/plain Date: Mon, 21 May 2007 21:12:00 GMT
See PeekMessage for sample response information.