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

Add short name for region in describe_regions() or describe_endpoints() #3869

Closed
2 tasks
bgupta opened this issue Sep 22, 2023 · 3 comments
Closed
2 tasks
Assignees
Labels
endpoints feature-request This issue requests a feature. p3 This is a minor priority issue

Comments

@bgupta
Copy link

bgupta commented Sep 22, 2023

Describe the feature

I find myself frequently using the shorthand abbreviations for regions that were popularized by availability zone "Zone IDs" e.g. use1 for us-east-1. I'd like a way to have this available in boto3.

Use Case

I commonly use the short name in cost optimization datasets. The short names are also commonly embedded in pricing data, so being able to have that maintained in the boto3 library would be a great help.

Proposed Solution

Extend https://github.com/boto/botocore/blob/develop/botocore/data/endpoints.json to have another dictionary key as well as decribe_endpoints.

Other Information

One could grunt through DescribeAvailabilityZones using regex and splits and such to potentially get these mapping, but it's very unclean.

Acknowledgements

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

SDK version used

boto3 1.28.53, botocore 1.31.53

Environment details (OS name and version, etc.)

Ubuntu 20.04, Python 3.11.5

@bgupta bgupta added feature-request This issue requests a feature. needs-triage This issue or PR still needs to be triaged. labels Sep 22, 2023
@indrora indrora added endpoints p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Sep 22, 2023
@indrora
Copy link

indrora commented Sep 22, 2023

You can use the EC2 call describe_availability_zones to get a list of the AZs in a region: https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html

Since these aren't guaranteed to be consistent account to account (e.g. use1-az1 could be us-east-1b or us-east-1c, for example), I doubt we'll be hardcoding them into the Endpoints file. However, I could see an interface to turn an AZ Id into a full identifier later on.

@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this May 29, 2024
@RyanFitzSimmonsAK
Copy link
Contributor

Hey, thanks for this feature request and for your patience. The team has no plans to implement this feature. As you and indrora both mentioned, DescribeAvailabilityZones provides both ZoneId and RegionName, so that's the intended way you can map these.

@RyanFitzSimmonsAK RyanFitzSimmonsAK closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
endpoints feature-request This issue requests a feature. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

3 participants