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 Queue URL format not same as SQS console #2339

Closed
alok87 opened this issue Mar 12, 2020 · 2 comments
Closed

SQS Queue URL format not same as SQS console #2339

alok87 opened this issue Mar 12, 2020 · 2 comments
Assignees
Labels
breaking-change Issue requires a breaking change to remediate. bug This issue is a confirmed bug. duplicate This issue is a duplicate.

Comments

@alok87
Copy link

alok87 commented Mar 12, 2020

When I do something like:

client = boto3.client("sqs", "us-west-1")
response = client.get_queue_url(QueueName="queue_name")
print response["QueueUrl"]
the URL i get is of the form: https://us-west-1.queue.amazonaws.com/<account_id>/<queue_name>.

But according to the docs here: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/ImportantIdentifiers.html, the queue url should be of the form:
http://sqs.us-east-1.amazonaws.com/123456789012/queue2.

This makes things very confusing... was the queue url format recently changed?

Related #224

@alok87 alok87 added the needs-triage This issue or PR still needs to be triaged. label Mar 12, 2020
@swetashre swetashre self-assigned this Mar 12, 2020
@swetashre
Copy link
Contributor

@alok87 - Thank you for your post. The reason we use the alternate endpoint style is to support Python 2.7 as it does not support SNI, which is required for the new endpoints. We would need to drop support for python 2.6-2.7.8. Even then it would still be a breaking change because people have whitelists for particular urls, so changing what we use would break them.

As a workaround you can use endpoint_url to override the url when constructing boto3 client. Something like this:

client = boto3.client('sqs',endpoint_url='https://sqs.us-west-2.amazonaws.com')

This issue is related to issue #1900

@swetashre swetashre added breaking-change Issue requires a breaking change to remediate. feature-request This issue requests a feature. bug This issue is a confirmed bug. duplicate This issue is a duplicate. and removed needs-triage This issue or PR still needs to be triaged. feature-request This issue requests a feature. labels Mar 12, 2020
@alok87
Copy link
Author

alok87 commented Mar 13, 2020

Thanks for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Issue requires a breaking change to remediate. bug This issue is a confirmed bug. duplicate This issue is a duplicate.
Projects
None yet
Development

No branches or pull requests

2 participants