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 does not return QueueUrl since v1.34.90 #3169

Closed
zodiac403 opened this issue Apr 24, 2024 · 6 comments
Closed

sqs create_queue does not return QueueUrl since v1.34.90 #3169

zodiac403 opened this issue Apr 24, 2024 · 6 comments
Assignees
Labels
bug This issue is a confirmed bug. p2 This is a standard priority issue response-requested Waiting on additional info and feedback.

Comments

@zodiac403
Copy link

zodiac403 commented Apr 24, 2024

Describe the bug

Sample code to reproduce the issue:]

sqs = boto3.client("sqs")
queue = sqs.create_queue(QueueName="name.fifo", Attributes={"FifoQueue": "true"})
queue_url = queue["QueueUrl"]

According to boto docs, create_queue() should return a dict like { 'QueueUrl': 'string' }
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sqs/client/create_queue.html

With version botocore==1.34.89 this is still the behavior I can observe

Expected Behavior

Resolve URL with queue_url = queue["QueueUrl"]

Current Behavior

queue_url = queue["QueueUrl"] results in a KeyError as the the result of create_queue() does not have an entry "QueueUrl".

Reproduction Steps

Code sample above

Possible Solution

No response

Additional Information/Context

No response

SDK version used

Observed the issue in 1.34.90, could not reproduce the issue in 1.34.89

Environment details (OS name and version, etc.)

MacOs Sonoma 14.4

@zodiac403 zodiac403 added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Apr 24, 2024
@tim-finnigan tim-finnigan self-assigned this Apr 24, 2024
@tim-finnigan tim-finnigan added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Apr 24, 2024
@tim-finnigan
Copy link
Contributor

tim-finnigan commented Apr 24, 2024

Hi @zodiac403 thanks for reaching out. There was a recent change in 1.34.90 related to SQS:

  • api-change:sqs: This release enables customers to call SQS using AWS JSON-1.0 protocol

However, the response syntax should be the same. I just tested your snippet in both 1.34.89 and 1.34.90 and confirmed that QueueUrl was returned as expected. Are you by chance using moto or some other third-party package? If so please try updating to see if that resolves the issue.

It looks like in moto version 4.2.10 is where support for the SQS change was added.

@tim-finnigan tim-finnigan added response-requested Waiting on additional info and feedback. p2 This is a standard priority issue and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Apr 24, 2024
@zodiac403
Copy link
Author

Hi @tim-finnigan ,

thanks for the very quick response. I will check that out on my side.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

@zodiac403
Copy link
Author

Hi @tim-finnigan ,

indeed, there was moto pinned to an old version in this project. Appreciate your support here!

@vbhjckfd
Copy link

I have same error, although no moto package installed.
1.34.89 works good, 90+ returns no QueueUrl in response
I had to pin botocore==1.34.89 😢

@vkundas
Copy link

vkundas commented Dec 7, 2024

The same goes for me. Moto and similar are not used, but 1.34.90+ fails with this error.
Also had to pin the version :(

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. p2 This is a standard priority issue response-requested Waiting on additional info and feedback.
Projects
None yet
Development

No branches or pull requests

4 participants