-
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
aws-cdk/hotswap: The bootstrap roles don't contain necessary permissions for hotswapping #26978
Comments
Hi @ajhool , thanks for reaching out. It looks like your issue is bit similar to this previous raised issue and has a submitted PR as well. Feel free to reach out if it looks different |
Hi @khushail I don't believe that issue (#26785) addresses or is directly related to this issue. I don't see any permissions related details in that issue or PR. That issue appears to be about adding support for hotswap to a different CDK interface (the library, as opposed to the cli). I'm not sure how the I will make a comment on that pointing this out and maybe they'll be able to include hotswap Role support in that PR. |
@ajhool , My bad, I did not get enought time to look into detail of that issue and linked it. |
Thanks @khushail . For anybody who might come across this issue the (hopefully temporary) workaround was to add |
When trying to manually assume a role using cdk --role-arn deploy --hotswap, this doesn't actually assume the role. It still defaults to the user associated with the configuration. |
Describe the bug
When we tried to add the
--hotswap
flag to our deployment command in CICD development environments, the deployment failed:The hotswap developer comments that the standard CDK bootstrap roles don't contain permissions to update Lambda functions directly (and presumably all of the other necessary hotswappable resource types), so they use some other credentials for the SDK:
aws-cdk/packages/aws-cdk/lib/api/hotswap-deployments.ts
Line 54 in a65cddf
Expected Behavior
We should be able to add the
hotswap
flag while using the CDK deployed bootstrap roles:Current Behavior
Using an IAM user with these permssions that just allow the IAM user to assume the CDK bootstrap roles:
Reproduction Steps
Possible Solution
The bootstrap command should create a more permissive
hotswap
deployment role. An "enable-hotswap-role" or "disable-hotswap-role" flag could be used to toggle the creation of that role -- I'm not sure which is a more sensible default.As a short-term alternative, documentation of the required permissions on the
CLI
role would be helpful.Additional Information/Context
No response
CDK CLI Version
2.86.0
Framework Version
No response
Node.js Version
20.1.0
OS
Linux / Github Actions
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: