The Delete on MessageQueue action deletes the queue specified by the queue URL. Normally, a queue must be empty before you can delete it. However, you can set the request parameter ForceDeletion to true to force a queue's deletion even if it's not empty.
![]() | Caution |
|---|---|
Use the |
Once you delete a queue, you must wait at least 60 seconds before creating a queue with the same name.
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 |
|---|---|---|
| When set to Type: Boolean Default: Valid values: | No |
The response contains no special elements besides the common response elements.
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 |
|---|---|---|
AWS.SimpleQueueService.NonEmptyQueue | Queue not empty. | 400 |
The following example REST request deletes the specified queue even if it's empty.
![]() | Important |
|---|---|
When specifying a queue when using the REST API, make sure to omit |
DELETE /A29E9WXPHGOG29/queue1?ForceDeletion=true 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 DeleteQueue for sample response information.