(codebuild): Too many attached IAM polcies (>10) when reusing a role for many jobs #31198
Closed
1 task
Labels
@aws-cdk/aws-codebuild
Related to AWS CodeBuild
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
I'm reusing the same role for CodeBuild jobs, to make cross-account role assumption easier.
I recently tried adding another project that uses the same role, and ran into the following error:
Most of the policies start with
CodeBuildBasePolicy-
,CodeBuildCachePolicy-
,CodeBuildSecretsManagerPolicy-
which I can't find a reference to in the CDK codebase? Is it created automatically by CodeBuild?Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
The role is created successfully
Current Behavior
Deployment fails with the following:
Reproduction Steps
Try to use the same IAM role for 11 CodeBuild projects, e.g. (pseudo-code)
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.121.1
Framework Version
No response
Node.js Version
18
OS
OSX
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: