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

Session() get_available_regions for some services returns an empty list #206

Closed
aaoswal opened this issue Mar 18, 2022 · 14 comments
Closed
Assignees
Labels
feature-request New feature or request service-api This issue pertains to the AWS API

Comments

@aaoswal
Copy link

aaoswal commented Mar 18, 2022

Original Issue:

Description

Trying to retrieve the available regions for the "memorydb" service returns an empty list where it should return some regions.

get_available_regions returns an empty list for "appconfig" and some other services.

Imagebuilder is not in the endpoints list. Which does not allow us to know in which region the service is available and returns an empty list

Expected Behavior

A full list of the regions where the service is available.

@tim-finnigan
Copy link

Linking this comment that mentions a few other missing services: boto/boto3#1662 (comment)

@aaoswal
Copy link
Author

aaoswal commented Mar 18, 2022

P61501590

@bblommers
Copy link

The iot-data service also returns an empty list in version 1.24.30.

This bug was introduced with the latest release - it worked up until 1.24.29.

@aaoswal
Copy link
Author

aaoswal commented Apr 1, 2022

Mentioning a similar case: boto/botocore#2656

@bblommers
Copy link

The signer service also returns an empty list in boto3 version 1.24.50 when calling boto3.Session().get_available_regions("signer")

@tim-finnigan
Copy link

This feature request is not currently under consideration — as an alternative please consider the approach referenced in this blog post for these capabilities: https://aws.amazon.com/blogs/aws/new-query-for-aws-regions-endpoints-and-more-using-aws-systems-manager-parameter-store/

@github-actions
Copy link

This issue is now closed.

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.

@bblommers
Copy link

Hi @tim-finnigan, I'm a little confused by your comment.
Are you saying that the get_available_regions-method, part of botocore, is now considered deprecated, and will no longer return useful information for new services?

@tim-finnigan
Copy link

Upon discussing this further with a colleague we wanted to clarify that the Python SDK team is currently investigating paths forward for this method, and deprecation is one possible outcome. Here is why:

As mentioned above, the source of information returned by get_available_regions is the endpoints.json file. This file is embedded in botocore and until version 1.28.0 was used for endpoint resolution in botocore.

The get_available_regions method was introduced many years ago as a secondary use of endpoints.json data, long before other sources of service availability were available. This has always been a sub-optimal solution because the information in endpoints.json is inherently frozen at release time. And even at release time the data in endpoints.json may lag behind reality due to how it is generated internally. The boto3 documentation addresses this (the function is not documented in the botocore documentation).

Since get_available_regions was introduced, the SSM Parameter Store API was introduced to solve the same user need better in 2019. Endpoint resolution in SDKs migrated to a different data source starting with botocore 1.28.0. As a result, endpoints.json will become an even less complete and up-to-date data source.

If completeness and recency of information is important for your use, switching to the SSM API is, and has been, the recommended approach.

@bblommers
Copy link

Hi @tim-finnigan, a very late clarification on this topic:

What would be the recommended approach to retrieve ISO region information?
For example the following call:
sess.get_available_regions("stepfunctions", partition_name="aws-iso-b")

As far as I can tell, the SSM parameter store does not contain any information about ISO regions. (It does have US-GOV and CH-regions.)

@tim-finnigan
Copy link

tim-finnigan commented Oct 2, 2023

@bblommers I would not rely on get_available_regions for ISO information. I recommend referencing this documentation: https://aws.amazon.com/compliance/iso-certified/

@bblommers
Copy link

Thanks @tim-finnigan. It would be nice to have a programmatic (official) way to retrieve this information - is it worth opening a feature request for this (in a separate issue)?

@tim-finnigan
Copy link

tim-finnigan commented Oct 2, 2023

Thanks @tim-finnigan. It would be nice to have a programmatic (official) way to retrieve this information - is it worth opening a feature request for this (in a separate issue)?

Sure you could open a separate issue for that feature request. I recommend outlining specifically what your use case is and how what you're requesting would help address that. (If you have a support plan then we advise reaching out directly through AWS Support for feature requests like this.) Also for retrieving info on ISO certification, a service like AWS Artifact may be better suited for what you are trying to do.

@lorengordon
Copy link

Thanks @tim-finnigan. It would be nice to have a programmatic (official) way to retrieve this information - is it worth opening a feature request for this (in a separate issue)?

Sure you could open a separate issue for that feature request. I recommend outlining specifically what your use case is and how what you're requesting would help address that. (If you have a support plan then we advise reaching out directly through AWS Support for feature requests like this.) Also for retrieving info on ISO certification, a service like AWS Artifact may be better suited for what you are trying to do.

@tim-finnigan The ISO partitions are actual AWS partitions, I.e. aws-iso and aws-iso-b , same as aws and aws-us-gov are partitions. Nothing to do with the ISO certification.... Please rethink the request from @bblommers ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request service-api This issue pertains to the AWS API
Projects
None yet
Development

No branches or pull requests

4 participants