The DELETE action on a Message endpoint removes the specified message from the queue. Messages stay in the queue until they are deleted with a DELETE request.
DELETE requests are validated on the following:
The message specified must exist.
Note: | Even if the message is locked by another reader due to the visibility timeout setting, it will still be deleted from the queue. |
| Name | Description | Type | Value |
|---|---|---|---|
MessageId | Required. The ID of the message to delete. | String. | The message ID returned from a PUT or GET request on a MessageQueue. |
The following example of a DELETE action shows how to delete a message from the queue.
DELETE /QueueURL/MessageId HTTP/1.1 Host: queue.amazonaws.com Authorization: [AWS authentication string] AWS-Version: 2006-04-01 Content-Type: text/plain Date: 2007-01-12T12:00:00Z
See DeleteMessage (Query) for sample response information.