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 am defining a Code Pipeline via CDK following the docs here to deploy a lambda. The final stage deploys a lambda cloudformation stack however I get an S3 permissions error when the deploy stage runs.
The deploy stage is defined as:
const pipeline = new Pipeline(this, 'PipelineStack', {
pipelineName: 'LambdaDeploymentPipeline',
pipelineType: PipelineType.V2
});
...source and build stage run correctly
pipeline.addStage({
stageName: 'Deploy',
actions: [
new CloudFormationCreateUpdateStackAction({
actionName: 'lambda-application-deployment',
stackName: props.lambdaApplicationStack.stackName,
templatePath: cdkBuildOutput.atPath('LambdaStack.template.yaml'),
adminPermissions: true,
})
],
})
the error is:
User: arn:aws:sts::975050149793:assumed-role/CodePipelineStack-PipelineStackDeploylambdaapplicat-gF0oLczc8T7Z/1726918379606 is not authorized to perform: s3:ListBucket on resource: "arn:aws:s3:::codepipelinestack-pipelinestackartifactsbucket870a-z0ggjsmh1utz" because no session policy allows the s3:ListBucket action (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied;
however when I check the permissions policy for the created role arn:aws:sts::975050149793:assumed-role/CodePipelineStack-PipelineStackDeploylambdaapplicat-gF0oLczc8T7Z/1726918379606
in the IAM console I can see it has list bucket permissions on the given bucket:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am defining a Code Pipeline via CDK following the docs here to deploy a lambda. The final stage deploys a lambda cloudformation stack however I get an S3 permissions error when the deploy stage runs.
The deploy stage is defined as:
the error is:
however when I check the permissions policy for the created role
arn:aws:sts::975050149793:assumed-role/CodePipelineStack-PipelineStackDeploylambdaapplicat-gF0oLczc8T7Z/1726918379606
in the IAM console I can see it has list bucket permissions on the given bucket:
what updates do I need to make to rectify this error?
Beta Was this translation helpful? Give feedback.
All reactions