-
Notifications
You must be signed in to change notification settings - Fork 4k
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
NOTICE: aws-cognito-identitypool-alpha: "Resource of type 'AWS::Cognito::IdentityPoolRoleAttachment' with identifier '[...]' already exists." >=2.179.0 breaks deployment of existing identity pools #33510
Comments
Before re-deployment, can you run Might be related to this: Alpha modules (2.179.0-alpha.0) see #33305 |
Sure. This is the Stack AwsCdkReproStack
Resources
[-] AWS::Cognito::IdentityPoolRoleAttachment IdentityPool/DefaultRoleAttachment IdentityPoolDefaultRoleAttachmentD81AFC39 destroy
[+] AWS::Cognito::IdentityPoolRoleAttachment IdentityPool/DefaultRoleAttachment IdentityPoolDefaultRoleAttachment40247836
✨ Number of stacks with differences: 1 |
@pahud thank you for the quick response by the way. I couldn't help but notice the I've not had much time to dig into this yet, but it seems to be caused by the change to a L1 construct to create the IdentityPoolRoleAttachment, which causes a new attachment to be created, prior to deleting the L2 one. |
Hi @monholm, Yes you are right, this is definitely a higher-priority issue. Testing this on my machine, I can see that this not only triggers redeployment, but prevents any deployments from happening at all, since it attempts to create the new We're working on a fix for this now, and should have the issue patched soon. |
Comments on closed issues and PRs are hard for our team to see. |
1 similar comment
Comments on closed issues and PRs are hard for our team to see. |
…rrectly (#33609) ### Issue # (if applicable) Closes #33510 ### Reason for this change A previous change ([PR33305](#33305)) removed the `IdentityPoolRoleAttachment` L2 construct, which also changed the creation logic of the default role attachment in the `IdentityPool` L2. This not only triggered redeployments, but did not allow for redeployment at all, as the new role attachment (with a different resource hash) was trying to be created before the old one was removed. This led to failed deployments, as only one role attachment can exist per identity pool. ### Description of changes Brought back the `IdentityPoolRoleAttachment` L2 logic to prevent redeployment for customers using CDK `<v2.179.0`. However, the construct is now no longer being exported, which preserves the original intention of preventing confusion about using this resource. ### Describe any new or updated permissions being added N/A ### Description of how you validated changes `yarn test && yarn integ test/integ.identitypool.js --update-on-failed` ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) **BREAKING CHANGE**: Any `IdentityPool` resources deployed in versions `>=2.179.0` will now fail to deploy. You will need to delete the `IdentityPoolRoleAttachment` from your stack via the console before redeploying. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Please add your +1 👍 to let us know you have encountered this
Status: IN-PROGRESS
Overview:
Describe the bug
Upgrading past v2.178.2 causes deployment of stack with existing (deployed with version <= 2.178.2) identity pool to fail.
Last Known Working CDK Version
2.178.2
Expected Behavior
Stack to deploy without issues.
Current Behavior
Deployment fails with the following error:
Reproduction Steps
Add an identity pool to the stack, e.g.:
Workaround
Bump to the latest CDK library version,
v2.181.1
.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.179.0
Framework Version
No response
Node.js Version
22.14.0
OS
macOS 15.3.1
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: