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

Provide a way to get partition from region #811

Closed
2 tasks
MikeDombo opened this issue May 24, 2023 · 6 comments
Closed
2 tasks

Provide a way to get partition from region #811

MikeDombo opened this issue May 24, 2023 · 6 comments
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue

Comments

@MikeDombo
Copy link

Describe the feature

Other SDK languages provide rich information about their regions, and specifically what partition they are in (ie. "aws", "aws-cn", etc).

Use Case

Knowing the partition is necessary to generate correct arns and for some business logic which may differ between partitions.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

A note for the community

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment
@MikeDombo MikeDombo added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 24, 2023
@rcoh
Copy link
Contributor

rcoh commented May 24, 2023

interesting—can you provide some more use cases when this is required? This is something we could consider exposing, we have the logic internally but we're often hesitant to expose behavior like this because of backwards and forwards compatibility concerns.

@rcoh rcoh removed the needs-triage This issue or PR still needs to be triaged. label May 24, 2023
@MikeDombo
Copy link
Author

MikeDombo commented May 24, 2023

In Java, I'm using the partition information to get the dnsSuffix and using the partition id to build an arn when looking up IAM managed policies. DNSSuffix is amazonaws.com.cn for example. This is used to manually build an endpoint to allow connecting to prod/gamma endpoints in a region without fully hardcoding the endpoint URL.

@rcoh
Copy link
Contributor

rcoh commented Aug 8, 2023

We do have this code internally to resolve endpoints. Wouldn't be necessarily a bad idea to expose it.

@bcressey
Copy link

As an example I'm running into today - when setting up a new ACM PCA, one of the fields required is the template ARN, in order to override the default template and use RootCACertificate/V1 instead.

The correct value varies based on the region per the ACM PCA docs:

arn:aws:acm-pca:::template/RootCACertificate/V1
arn:aws-us-gov:acm-pca:::template/RootCACertificate/V1
...

If I could get the partition from the region, then it would be trivial to generate the ARN, since the other fields are constant.

@jmklix jmklix added the p3 This is a minor priority issue label Jan 19, 2024
@jmklix
Copy link
Member

jmklix commented Apr 26, 2024

Closing this for now, as this isn't something that we plan on supporting in the near future.

@jmklix jmklix closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
Copy link

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
feature-request A feature should be added or improved. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

4 participants