The POST on QueueService action creates a new queue. SQS assigns the queue a queue URL; you must use this URL when performing actions on the queue (for more information, see About the Queue URL).
When you create a queue, you must provide a queue name that is unique within the scope of the queues you own. If a queue with the same name already exists, SQS doesn't create a new queue or return an error. Instead, SQS simply returns the queue URL of the existing queue.
![]() | Note |
|---|---|
If you delete a queue, you must wait at least 60 seconds before creating a queue with the same name. |
When you create a queue, FullControl access rights are granted to you for the queue. Only you (as owner of the queue), or a grantee assigned FullControl rights to the queue, can grant or deny access rights to the queue and its messages.
The default value for VisibilityTimeout (30 seconds) is also set when a queue is created. See Visibility Timeout for information about how visibility timeout works.
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 name to use for the queue created. The queue name must be unique within the scope of all your queues. Type: String Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed. | Yes |
The response contains no special elements besides the common elements listed in The Structure of a Response.
| Name | Description |
|---|---|
| The queue URL for the queue you created. If a queue already exists with the queue name you specified in the request, the queue URL for that queue is returned. Type: String Ancestor: |
The following table lists the special error the action returns (in addition to the common errors listed in Common Errors).
| Error | Description | HTTP Status Code |
|---|---|---|
AWS.SimpleQueueService.QueueDeletedRecently | You must wait 60 seconds after deleting a queue before you can create another with the same name. | 400 |
The following example REST request creates a queue named queue2.
POST /?QueueName=queue2 HTTP/1.1 Host: queue.amazonaws.com Authorization: [AWS authentication string] Content-Type: text/plain AWS-Version: 2007-05-01 Date: Mon, 21 May 2007 21:12:00 GMT
See CreateQueue for sample response information.