Copilot-cli: Error: AccessDenied - get template version of environment

Created on 20 Jan 2021  Â·  2Comments  Â·  Source: aws/copilot-cli

Hi there,

I probably did something silly but I can't find what....

context:

  • I have Copilot v1.0.0.
  • I have a Copilot application with 2 environments: test and prod
  • I have a service that I can deploy to test using copilot svc deploy
  • I created a pipeline for the test environment and it is failing at build time for a permission issue when it is doing an environment upgrade. Looks like I don't have permission to "get template version of environment prod"...

This is an extract of the log for the failing build:

[Container] 2021/01/19 20:05:43 Running command ./copilot-linux env upgrade --all
Environment test is already on the latest version v1.1.0, skip upgrade.
✘ get template version of environment prod in app my-application: get template summary for stack my-application-prod: AccessDenied: User: arn:aws:sts::888888888888:assumed-role/pipeline-rnwl-backend-services-Rn-BuildProjectRole-19KBLABLAZRPS/AWSCodeBuild-7427a95d-5555-4949-80f5-01d380b4e38c is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::888888888888:role/rnwl-backend-services-prod-EnvManagerRole
    status code: 403, request id: f32e8a8c-5555-41c3-bd1b-cf9927859931
[Container] 2021/01/19 20:05:44 Command did not exit successfully ./copilot-linux env upgrade --all exit status 1
[Container] 2021/01/19 20:05:44 Phase complete: POST_BUILD State: FAILED
[Container] 2021/01/19 20:05:44 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: ./copilot-linux env upgrade --all. Reason: exit status 1

Any idea what is happening and how I could fix that?

Thanks a lot!

Most helpful comment

Looks like issue #1805 is the problem. Also looks like it is fixed by the new version 1.1.0.
I'll update my installation of Copilot!

All 2 comments

Looks like issue #1805 is the problem. Also looks like it is fixed by the new version 1.1.0.
I'll update my installation of Copilot!

Yep! #1805 was the issue.
I updated to the latest version and the pipeline if working fine.
Closing the issue :)

Was this page helpful?
0 / 5 - 0 ratings