You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using the 'Code Pipeline' example as a base to start from and when the CodePipeline deploy stage runs the created 'LambdaStack' stack fails to deploy the lambda with an error when creating the 'Lambda' resource.
It looks like the issue is that the KMS key used to encrypt the pipeline's artifact bucket does not get a key policy that grants access to the role used by the CloudFormation Deploy configuration (not the role of the action, the RoleArn in the Configuration). It looks like it does have the roles for each action, however. I "fixed" it by manually adding another statement to the KMS key policy:
I'm filing this as a bug rather than a documentation issue because I can't actually see how I'd get any kind of handle on the created KMS key in order to add to it's policy, it looks like it is all done behind the scenes.
Observe error when the CodePipeline runs the deploy stage
Add the above statement to the KMS key policy for the PipelineDeployingLambdaSt-PipelineDeployLambdaCFND-*** role
Delete the LambdaDeploymentStack stack
Trigger CodePipeline
Observe success
Error Log
Your access has been denied by S3, please make sure your request credentials have permission to GetObject for pipelinedeployinglambdas-pipelineartifactsbucket2-10tl91h7l6k52/PipelineDeployingLam/LambdaBuil/JL0zh79. S3 Error Code: AccessDenied. S3 Error Message: Access Denied (Service: AWSLambdaInternal; Status Code: 403; Error Code: AccessDeniedException; Request ID: bffb5f70-ae11-4397-b6de-753b30d797ca)
The text was updated successfully, but these errors were encountered:
Thanks for opening the issue @evansgp . It's not just a documentation bug; it was a problem fixed in #5190 . As you can see, the fix was already merged, and will be released with version 1.19.0, which will be released 2 weeks from now (next week is re:Invent, so we won't be having a release).
I was using the 'Code Pipeline' example as a base to start from and when the CodePipeline deploy stage runs the created 'LambdaStack' stack fails to deploy the lambda with an error when creating the 'Lambda' resource.
It looks like the issue is that the KMS key used to encrypt the pipeline's artifact bucket does not get a key policy that grants access to the role used by the CloudFormation Deploy configuration (not the role of the action, the
RoleArn
in theConfiguration
). It looks like it does have the roles for each action, however. I "fixed" it by manually adding another statement to the KMS key policy:I'm filing this as a bug rather than a documentation issue because I can't actually see how I'd get any kind of handle on the created KMS key in order to add to it's policy, it looks like it is all done behind the scenes.
I've copied the doco example into a repo for easier repro: https://github.com/evansgp/pipeline
Reproduction Steps
test-repo
or adjustpipeline-stack.ts
as required.npm run build
cdk deploy PipelineDeployingLambdaStack
PipelineDeployingLambdaSt-PipelineDeployLambdaCFND-***
roleLambdaDeploymentStack
stackError Log
The text was updated successfully, but these errors were encountered: