Getting error in Lambda logs, and GuardDuty not enabled in any accounts except master.
[ERROR] TypeError: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "/var/task/guardduty_enabler.py", line 304, in lambda_handler
aws_account_dict = get_account_list()
File "/var/task/guardduty_enabler.py", line 100, in get_account_list
while 'NextToken' in accounts:
Getting error in Lambda logs, and GuardDuty not enabled in any accounts except master. [ERROR] TypeError: argument of type 'NoneType' is not iterable Traceback (most recent call last): File "/var/task/guardduty_enabler.py", line 304, in lambda_handler aws_account_dict = get_account_list() File "/var/task/guardduty_enabler.py", line 100, in get_account_list while 'NextToken' in accounts: