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

Script exits on enabled accounts #8

Closed apalooza1 closed 5 years ago

apalooza1 commented 5 years ago

If the script reads in an account that already has security hub enabled, it will automatically exit. Ideally, it should skip to the next line/account in the csv until the list is exhausted.

ryanholland commented 5 years ago

The script does not exit on this condition but rather does as you have suggested and first tries to add it as a member and then moves on to the next account.

apalooza1 commented 5 years ago

I tested where the first account in my list was already enabled. The script did not go on to the 2nd and 3rd accounts in the list. Thoughts?

ryanholland commented 5 years ago

Ensure you have one account,email per line in your file also make sure there are no control characters.

apalooza1 commented 5 years ago

After retesting several times, functionality seems to be as expected. Not sure what happened on the first run. Thanks.