awslabs / aws-securityhub-multiaccount-scripts

This script automates the process of running the Security Hub multi-account workflow across a group of accounts that are in your control
MIT No Attribution
271 stars 108 forks source link

`get_available_regions()` returns empty list #1

Closed dlgoodr closed 5 years ago

dlgoodr commented 5 years ago

https://github.com/awslabs/aws-securityhub-multiaccount-scripts/blob/c49316828c6fd604aebf993c2932d8f83dcc7cfb/enablesecurityhub.py#L134

Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto3
>>> boto3.session.Session().get_available_regions("securityhub")
[]
>>>

I would expect this to return a list of available regions, as it does for guardduty or ec2.

>>> boto3.session.Session().get_available_regions("guardduty")
[u'ap-northeast-1', u'ap-northeast-2', u'ap-south-1', u'ap-southeast-1', u'ap-southeast-2', u'ca-central-1', u'eu-central-1', u'eu-west-1', u'eu-west-2', u'eu-west-3', u'sa-east-1', u'us-east-1', u'us-east-2', u'us-west-1', u'us-west-2']
>>>
ryanholland commented 5 years ago

This has been fixed, if you still experience this issue please update to the latest version of boto.