Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Sandbox stack does not properly grant AssumeRole on ProjectSudoRole #2

Open
athewsey opened this issue Nov 3, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@athewsey
Copy link
Collaborator

athewsey commented Nov 3, 2020

Although the sandbox.yml stack grants the user's execution role permission to sts:AssumeRole on the SudoRole, the SudoRole's trust policy is not updated to add the new principal - so the access is still blocked... Resulting in an error something like the below at the end of notebook 1:

An error occurred (AccessDenied) when calling the AssumeRole operation: User: arn:aws:sts::123456789012:assumed-role/AmazonSageMaker-ExecutionRole-XYZ/SageMaker is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::123456789012:role/forestcover/forestcover-ProjectSudoRole

The manual fix is to open the SudoRole in the IAM console, go to the "Trust Relationships" tab, and add an entry something like:

    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::123456789012:role/AmazonSageMaker-ExecutionRole-XYZ"
      },
      "Action": "sts:AssumeRole"
    }

...But the templates should be updated to automate this process

@athewsey athewsey added the bug Something isn't working label Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant