Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Cannot create an SQS queue with FifoQueue: false #10812

Closed
1 task done
JavaScriptBach opened this issue May 13, 2024 · 2 comments · Fixed by #10820
Closed
1 task done

bug: Cannot create an SQS queue with FifoQueue: false #10812

JavaScriptBach opened this issue May 13, 2024 · 2 comments · Fixed by #10820
Assignees
Labels
aws:sqs Amazon Simple Queue Service status: backlog Triaged but not yet being worked on type: bug Bug report

Comments

@JavaScriptBach
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I can't create an SQS Queue using the AWS JavaScript SDK with FifoQueue: "false". Attempting to do so gives an error of InvalidAttributeName: Unknown Attribute FifoQueue and metadata saying that localstack responded with a 400.

Expected Behavior

The queue is created successfully.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

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

docker-compose.yml

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

const sqs = new SQSClient({ endpoint: "http://localstack:4566", credentials: { accessKeyId: "foo", secretAccessKey: "bar", }, region: "us-east-1" });

await sqs.send(
    new CreateQueueCommand({
      QueueName: "test-queue",
      Attributes: {
        FifoQueue: "false",
      },
    }),
  );

Environment

- OS: Ubuntu 22.04
- LocalStack: 3.4.0
- @aws-sdk/client-sqs version: 3.370.0

Anything else?

No response

@JavaScriptBach JavaScriptBach added status: triage needed Requires evaluation by maintainers type: bug Bug report labels May 13, 2024
@localstack-bot
Copy link
Collaborator

Welcome to LocalStack! Thanks for reporting your first issue and our team will be working towards fixing the issue for you or reach out for more background information. We recommend joining our Slack Community for real-time help and drop a message to LocalStack Pro Support if you are a Pro user! If you are willing to contribute towards fixing this issue, please have a look at our contributing guidelines and our contributing guide.

@Anze1508 Anze1508 added aws:sqs Amazon Simple Queue Service status: backlog Triaged but not yet being worked on and removed status: triage needed Requires evaluation by maintainers labels May 14, 2024
@cloutierMat cloutierMat self-assigned this May 14, 2024
@cloutierMat
Copy link
Contributor

cloutierMat commented May 14, 2024

Hi @JavaScriptBach,

This is actually the behaviour observed with aws. Trying to create a queue with the FifoQueue attribute does result in an error.

▶ aws sqs create-queue --queue-name my-queue --attributes "{\"FifoQueue\":\"false\"}"

An error occurred (InvalidAttributeName) when calling the CreateQueue operation: Unknown Attribute FifoQueue.

This is a well known "issue" and the recommended approach is to either not set the attribute at all or to set it as undefined. Looking into it, I realised that Localstack was allowing for the original creation with the attribute set but wasn't allowing subsequent create_queue calls.

I just opened a PR that will bring parity with AWS behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:sqs Amazon Simple Queue Service status: backlog Triaged but not yet being worked on type: bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants