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

AccessDenied when calling the AssumeRole operation #32

Open manidhar1986 opened 4 years ago

manidhar1986 commented 4 years ago

python enablesecurityhub.py --master_account MASTERACCOUNTID --assume_role ManageSecurityHub --enabled_regions ap-south-1 enable.csv Enabling members in these regions: ['ap-south-1'] Assumed session for MASTERACCOUNT ID. Error Processing Account MEMBERACCOUNTID

Failed Accounts

XXXXXXXXX: ClientError(u'An error occurred (AccessDenied) when calling the AssumeRole operation: User: arn:aws:sts::MASTERACCOUNTID:assumed-role/ManageSecurityHubInstanceRole/i-0a8a33c4f573xxxxx is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::MEMBERACCOUNTID:role/ManageSecurityHub',)

Option 1 selected. [EC2 instance with enablesecurityhub]

Could see the same IAM roles in master account and member account. Ran CFT to create the roles and instance profile,policy. Not sure what am i missing here. Any assistance here please.