-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
AppStagingSynthesizer: BucketDeployment fails copy #26672
Comments
Tracked it down. The target bucket of |
Yes custom role should fix that. |
Comparing the cdk key policy, it looks like that it's a little different to the usual cdk-bootstrap key.
AppStagingSynthesizer KMS key policy:
So adding
into AppStagingSynthesizer KMS key policy would solve the issue. |
I resolved this by using the custom role approach and just giving it this inline policy for the decryption to work (I didn't want to do a lookup for the KMS key to get it by the alias), which uses a similar condition that elgohr listed above:
I figure this at least keeps it to just that role, and it uses the alias of the key to control the permissions as wellas the s3 service call - not as bullet proof as having the ARN of the key but I felt like it was an OK alternative in the mean time. |
Describe the bug
When using
BucketDeployment
for deploying a local folder along withAppStagingSynthesizer
(@aws-cdk/app-staging-synthesizer-alpha), it fails.BucketDeployment is used as
The custom ressource within BucketDeployment returns
The same error occurs when separating the asset (like https://docs.aws.amazon.com/cdk/api/v2/docs/app-staging-synthesizer-alpha-readme.html#deploy-time-s3-assets).
Running
aws s3 cp s3://${CORRECT_BUCKET_ADDRESS}/deploy-time/9ece006bc2680af0997c046110f690bd28ba8f97707060b46e3b7eaeeaa74a12.zip ./
locally copies the data as expected.Expected Behavior
It should work as without
AppStagingSynthesizer
.Reproduction Steps
Create a deployment that uses
BucketDeployment
together withAppStagingSynthesizer
.CDK CLI Version
2.90.0 (build 8c535e4)
Node.js Version
v18.16.0
OS
OS X 13.5
Language
Typescript
The text was updated successfully, but these errors were encountered: