-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Method for Retrieving SQS Queue URL from ARN #1145
Comments
@anthonybarsotti Thank you for the feedback and thoughts! You are correct that, The Can you please elaborate on how are you generating the |
Can you elaborate on how to get the URL from listSubscriptionsByTopic? Currently that method is providing the SQS ARN as the endpoint property of the return value for that function, not the URL. |
@anthonybarsotti Thanks for the reply. Using method To help me better understand your problem, please elaborate which URL you want to get and also it will be helpful to know the reason are you trying to get this. Thanks. |
Caveat. I'n not using this project but I'm interested in the answer to OP question. I am using the SDK for another language, but I'm using the ARN for some technologies (SNS) but the URL for this one (SQS). Since we are trying to generalize and avoid confusion, we are trying to just use ARNs everywhere in our configs. Is there a future proof method for converting the ARN to a URL, or is it subject to change? |
@dbrownxc SQS's developer guide cautions that you should not create a queue URL on your own, as the format is not guaranteed to remain stable forever. The queue ARN contains the region, AWS account ID, and queue name, which can be used to call the |
Perfect, thanks! |
Looks like questions have been answered or lacking information for ages, closing, yet feel free to reopen with further contents :) |
Thank you for posting this question. Most of the AWS APIs are very consistent in how you address entities, but SQS is very weak in this regard. The various API methods accept and return either ARNs, queue names or queue URLs seemingly in a random pattern that makes them very difficult to deal with. Eventually I created a data structure within my application that allows me efficiently convert between these three identifiers. |
I'd also add that using the Having another API endpoint for SQS that took |
The
SQSClient
provides the methodgetQueueUrl
which creates a URL given the Queue's name. However, there is no similar method available to construct the Queue's URL from its ARN, which happens to be returned by other methods such aslistSubscriptionsByTopic
in theSNSClient
.You can, of course, generate a Queue URL from its ARN manually, but how reliable and future proof is that if it's not part of the SDK itself?
The text was updated successfully, but these errors were encountered: