S3 Service Fails and Unable to Retrieve region agnostic services like Route53
StoreBot opened this issue · comments
No response for s3, route53 etc.
def get_regions_for_service(requested_service, requested_regions=()):
"""Given a service name, return a list of region names where this service can have resources,
restricted by a possible set of regions."""
if requested_service in ('iam', 'cloudfront', 's3', 'route53'):
# instead of None use the default region so it will also work for gov-cloud.
return [boto3.session.Session().region_name if boto3.session.Session().region_name else 'us-east-1']
regions = set(get_service_regions().get(requested_service, []))
return list(regions) if not requested_regions else list(sorted(set(regions) & set(requested_regions)))
This problem is fixed in v0.9. by a new heuristic.