The Wayback Machine - https://web.archive.org/web/20250520204943/https://github.com/localstack/localstack/issues/5801
Skip to content

SQS Creating a queue with the same name is allowed immediatelly after queue deletion #5801

Closed
@a-wi

Description

@a-wi

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

After deleting a queue you can create another one with the same name immediately.
With AWS you must wait 60 seconds till you succeed with re-creating the queue - see AWS API.

Expected Behavior

Local Stack should be compatible with AWS and after deleting a queue it should be not possible to create a queue with same name for 60 seconds.

How are you starting LocalStack?

With a docker run command

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

docker run localstack/localstack

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

The queue is successfully created when you delete and immediately recreate the queue with these commands and LocalStack:

for /f "skip=1 eol=} tokens=2 delims= " %i in ('aws sqs create-queue --queue-name testQueue --endpoint-url http://localhost:4566') do set QUEUEURL=%i
aws sqs delete-queue  --endpoint-url http://localhost:4566 --queue-url %QUEUEURL%
aws sqs create-queue --queue-name testQueue --endpoint-url http://localhost:4566

create_queue_ls

An error is reported when you attempt to do the same with AWS:

for /f "skip=1 eol=} tokens=2 delims= " %i in ('aws sqs create-queue --queue-name testQueue') do set QUEUEURL=%i
aws sqs delete-queue  --queue-url %QUEUEURL%
aws sqs create-queue --queue-name testQueue

create_queue_aws

Environment

- OS: Win 10
- LocalStack: 0.14.1
- AWS CLI: 2.0.61

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    aws:sqsAmazon Simple Queue Servicetype: featureNew feature, or improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions