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

Getting timeout error after assuming role in check_config() part #60

Closed mfarrokhnia closed 3 years ago

mfarrokhnia commented 3 years ago

Hi, I'm running the script on AWS Lambda. I get timeout error under " # Processing accounts to be linked" part after:

sh_client = session.client('securityhub', region_name=aws_region)

Output:

Beginning $accountid in eu-west-1

END RequestId: 107f2b3c-8b34-4da7-a1a5-1c913e71c75c
REPORT RequestId: 107f2b3c-8b34-4da7-a1a5-1c913e71c75c  Duration: 3003.47 ms    Billed Duration: 3000 ms    Memory Size: 128 MB Max Memory Used: 87 MB  Init Duration: 264.31 ms    
2021-02-02T11:30:25.371Z 107f2b3c-8b34-4da7-a1a5-1c913e71c75c Task timed out after 3.00 seconds

Any help would be appreciated.

mfarrokhnia commented 3 years ago

I had to increase the timeout in aws-lambda, it worked fine after that.