question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cross Account Authorization Error - AccessDeniedException

See original GitHub issue

Hi,

I deployed the aws-sharr-deploy.template in “Main” account and also deployed the CISPermissions.template in the “member” account. I made sure to provide the correct account number of the main account when deploying to member account.

I’m getting the following error when running a cross account remediation and I really can’t figure out why. I checked the cross-account roles and the permissions seems to be correct.

ERROR "An error occurred (AccessDeniedException) when calling the StartAutomationExecution operation: User: arn:aws:sts::111111111111:assumed-role/SO0111_CIS4142_memberRole_us-west-2/sechub_master is not authorized to perform: ssm:StartAutomationExecution on resource: arn:aws:ssm:us-west-2::automation-definition/AWS-DisablePublicAccessForSecurityGroup:1"

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fuellbiecommented, May 3, 2021

I got the same error after installing the solution today (v1.2.0). I resolved it by manually replacing the account id by a wildcard in the automation-definition resource in the inline policy of the SO0111-SHARR-Remediation-AFSBP-EC2.2_us-east-1 role. The statement looks as follows:

        {
            "Action": [
Duplicate of #
                "ssm:StartAutomationExecution",
                "ssm:GetAutomationExecution"
            ],
            "Resource": [
                "arn:aws:ssm:eu-central-1:<accountid>:document/SO0111_Remediation_AFSBP_EC2.7",
                "arn:aws:ssm:eu-central-1:<accountid>:automation-definition/*",
                "arn:aws:ssm:eu-central-1:*:automation-definition/*",
                "arn:aws:ssm:eu-central-1:<accountid>:automation-execution/*"
            ],
            "Effect": "Allow"
        }
1reaction
mobri2acommented, Apr 27, 2021

Update your stack (remove and replace) to v1.2.0, which was released recently. I haven’t seen this issue before, but best to get on the latest release first. Retry after the update and let us know if it’s working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve authorization errors when subscribing Lambda ...
AWS CLI error example: You tried to create the subscription from a different account than the one that your Lambda function is in....
Read more >
Error while doing AWS Lambda Cross Account integration ...
An error occurred (AuthorizationError) when calling the Subscribe operation: The account ACCOUNT-A is not the owner of the lambda function ...
Read more >
Cross Account Authorization Error - AccessDeniedException
Hi, I deployed the aws-sharr-deploy.template in "Main" account and also deployed the CISPermissions.template in the "member" account.
Read more >
Terraform | Error creating Cloudwatch log subscription filter ...
Terraform | Error creating Cloudwatch log subscription filter: AccessDeniedException: Cross-account role passing is not allowed.
Read more >
Top 5 Common AWS IAM Errors you Need to Fix | A Cloud Guru
There are two possible causes for this AccessDenied error: the user in your development account doesn't have permission to call sts:AssumeRole, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found