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

sqs.create_queue fails for ".fifo" suffix in queue name #3058

Closed
kamikaze opened this issue Nov 13, 2023 · 4 comments
Closed

sqs.create_queue fails for ".fifo" suffix in queue name #3058

kamikaze opened this issue Nov 13, 2023 · 4 comments
Assignees
Labels
bug This issue is a confirmed bug. p3 This is a minor priority issue response-requested Waiting on additional info and feedback. sqs

Comments

@kamikaze
Copy link

Describe the bug

SQS

response = await sqs.create_queue(QueueName='messages.fifo')

results in:

botocore.exceptions.ClientError: An error occurred (InvalidParameterValue) when calling the CreateQueue operation: Can only include alphanumeric characters, hyphens, or underscores. 1 to 80 in length

while in docs there is:

PARAMETERS:
QueueName (string) –

[REQUIRED]

The name of the new queue. The following limits apply to this name:

A queue name can have up to 80 characters.

Valid values: alphanumeric characters, hyphens ( -), and underscores ( _).

A FIFO queue name must end with the **.fifo suffix**.

Expected Behavior

botocore.exceptions.ClientError: An error occurred (InvalidParameterValue) when calling the CreateQueue operation: Can only include alphanumeric characters, hyphens, or underscores. 1 to 80 in length

Current Behavior

Queue created

Reproduction Steps

response = await sqs.create_queue(QueueName=queue_name)

Possible Solution

No response

Additional Information/Context

No response

SDK version used

botocore==1.31.17

Environment details (OS name and version, etc.)

Linux

@kamikaze kamikaze added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Nov 13, 2023
@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this Nov 13, 2023
@RyanFitzSimmonsAK RyanFitzSimmonsAK added investigating This issue is being investigated and/or work is in progress to resolve the issue. sqs p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Nov 13, 2023
@RyanFitzSimmonsAK
Copy link
Contributor

Hi @kamikaze, thanks for reaching out. You're getting this error because you're trying to create a standard queue with a .fifo suffix. To create a FIFO queue, you must specify the FifoQueue to be true in the attributes. Here's an example :

import boto3

sqs = boto3.client("sqs")

response = sqs.create_queue(
    QueueName='myTestQueue.fifo',
    Attributes={
        'FifoQueue': 'true'
    }
)

Hope that helps!

@RyanFitzSimmonsAK RyanFitzSimmonsAK added response-requested Waiting on additional info and feedback. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Nov 14, 2023
@kamikaze
Copy link
Author

Hi @kamikaze, thanks for reaching out. You're getting this error because you're trying to create a standard queue with a .fifo suffix. To create a FIFO queue, you must specify the FifoQueue to be true in the attributes. Here's an example :

import boto3

sqs = boto3.client("sqs")

response = sqs.create_queue(
    QueueName='myTestQueue.fifo',
    Attributes={
        'FifoQueue': 'true'
    }
)

Hope that helps!

thanks. but what is the point to name it with a suffix then? two conditions instead of one

@RyanFitzSimmonsAK
Copy link
Contributor

It's likely so that users have an easier way to determine the type of a queue, without needing to use GetQueueAttributes.

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. p3 This is a minor priority issue response-requested Waiting on additional info and feedback. sqs
Projects
None yet
Development

No branches or pull requests

2 participants