aws-amplify / aws-amplify/amplify-hosting

Amplify Console managed policy missing permission cognito-idp:UpdateGroup, backend build fails

Open
#2,886 1 comment 0 reactions 1 assignee Claimed by @Jay2113 View on GitHub
backend-builds pending-prioritization usability
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have checked to see if my question is addressed in the [FAQ](https://github.com/aws-amplify/amplify-hosting/blob/master/FAQ.md).
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-hosting/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

### App Id

d34opb5305os4y

### Region

us-east-1

### Amplify Hosting feature

Backend builds

### Describe the bug

Deployed an auth update using Amplify Console backend builds. The AWS managed policy `AdministratorAccess-Amplify` does not include permission to call `cognito-idp:UpdateGroup` on the existing `usersGroup` so the cfn deploy fails.

> ``` UPDATE_FAILED usersGroup AWS::Cognito::UserPoolGroup Mon Jul 25 2022 23:15:41 GMT+0000 (Coordinated Universal Time) User: arn:aws:sts::****:assumed-role/amplifyconsole-backend-role/BuildSession is not authorized to perform: cognito-idp:UpdateGroup on resource: arn:aws:cognito-idp:us-east-1:****:userpool/us-east-1_**** because no identity-based policy allows the cognito-idp:UpdateGroup action (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: AccessDeniedException; Request ID: 53a818fc-950c-47a3-8287-86836b5c126b; Proxy: null) ```

### Expected behavior

Managed policy `AdministratorAccess-Amplify` should have all permissions necessary for Amplify CLI to work.

The documentation mentions this list of required permissions: https://docs.amplify.aws/cli/reference/iam/

### Reproduction steps

1. Make a change to the auth cfn template, create PR, merge
2. Amplify CI/CD picks up change, starts deploying backend
3. Missing permission causes CloudFormation deploy to fail, so Amplify build fails

### Build Settings

Amplify CLI version overridden to `latest` using console 'Build image settings'

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.