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

Breaking AWS CloudFormation permissions changes impacting Amplify CLI? #13622

Closed
dthian opened this issue Feb 28, 2024 · 3 comments
Closed

Breaking AWS CloudFormation permissions changes impacting Amplify CLI? #13622

dthian opened this issue Feb 28, 2024 · 3 comments
Labels
cloudformation Issues related to CloudFormation workflow pending-response Issue is pending response from the issue author pending-triage Issue is pending triage question General question

Comments

@dthian
Copy link

dthian commented Feb 28, 2024

Amplify CLI Version

12.8.2

Question

Hi, I just received an email from AWS CloudFormation regarding an API behaviour change that could cause disruptions.

Prior to January 31, 2024, CloudFormation actions on nested stacks were allowed if the action was part of a parent stack operation.

However, this is no longer true with the breaking change - If the user attempts to update a stack after adding a nested stack to the template, then the nested stack will also require CreateStack permissions for the operation to succeed. Similarly, if a nested stack is removed, the user will need DeleteStack permissions for the nested stack in order to successfully update the parent stack.

On April 5, 2024, AWS will remove my account from the allow-list, which will make this new behavior take effect. AWS strongly recommends that I modify or attach IAM Policies for the affected APIs by April 5, 2024, to avoid service disruption.

As it is mainly the Amplify CLI that is generating the CloudFormation templates (and therefore permissions) and deploying them, and since these permission behaviour are changing as per the AWS email - is there guidance on how to handle this CloudFormation change?

@dthian dthian added pending-triage Issue is pending triage question General question labels Feb 28, 2024
@ykethan
Copy link
Member

ykethan commented Feb 28, 2024

Hey @dthian, thank you for reaching out. The default AdministratorAccess-Amplify includes the CFN permission to stacks that start with amplify-* with the following

{
            "Sid": "CLICloudformationPolicy",
            "Effect": "Allow",
            "Action": [
                "cloudformation:CreateChangeSet",
                "cloudformation:CreateStack",
                "cloudformation:DeleteStack",
                "cloudformation:DescribeChangeSet",
                "cloudformation:DescribeStackEvents",
                "cloudformation:DescribeStackResource",
                "cloudformation:DescribeStackResources",
                "cloudformation:DescribeStacks",
                "cloudformation:ExecuteChangeSet",
                "cloudformation:GetTemplate",
                "cloudformation:UpdateStack",
                "cloudformation:ListStacks",
                "cloudformation:ListStackResources",
                "cloudformation:DeleteStackSet",
                "cloudformation:DescribeStackSet",
                "cloudformation:UpdateStackSet"
            ],
            "Resource": [
                "arn:aws:cloudformation:*:*:stack/amplify-*"
            ]
        },

But if you are using a custom policy for your deployments, you will need to update the policy .

@ykethan ykethan added pending-response Issue is pending response from the issue author platform-push Issues related to `amplify push` cloudformation Issues related to CloudFormation workflow and removed platform-push Issues related to `amplify push` labels Feb 28, 2024
@ykethan
Copy link
Member

ykethan commented May 3, 2024

Closing the issue due to inactivity. Do reach out to us if you require any assistance.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
Copy link

github-actions bot commented May 3, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloudformation Issues related to CloudFormation workflow pending-response Issue is pending response from the issue author pending-triage Issue is pending triage question General question
Projects
None yet
Development

No branches or pull requests

2 participants