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

Error Processing Account #46

Open jwbeals opened 4 years ago

jwbeals commented 4 years ago

Getting 'error processing account' on almost all accounts except for us-east regions. It errors out if selecting any other regions.

LewS commented 4 years ago

This is due to a lack of unicode handling. The script pulls all available securityhub regions using the session.get_available_regions('securityhub') which returns in unicode format as you may have noticed from the output [u'region',... I fixed by converting the securityhub_regions list to utf-8, but there needs to be a more elegant solution to handle all cases.

LewS commented 4 years ago

Actually that's wrong, I had an empty list the script still fails... "Unable to enable Security Hub...."

LewS commented 4 years ago

Problem turns out to be the newer regions not enabled by default returned by session.get_available_regions('securityhub')

jwbeals commented 4 years ago

I was using UTF-8, but I guess you're saying that isn't the issue?