Skip to content
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

fix(codepipeline): large cross-region pipelines exceed IAM policy size limit #16350

Closed

Commits on Sep 2, 2021

  1. fix(codepipeline): large cross-region CodePipeline exceed IAM policy …

    …size limit
    
    When we generate CodePipelines, we need to add an `sts:AssumeRole` statement for each Action in the pipeline,
    and a `Bucket.grantReadWrite()` statement for each region the pipeline is in,
    to the policy statement of the pipeline's Role.
    For pipelines with many Actions and/or regions,
    this makes the policy exceed IAM limit of 10240 bytes.
    
    Extract a new class from the CodePipeline CloudFormation Actions that caches the statements added to a given Principal by the 'Action' field,
    and groups the statements with the same 'Actions' by adding elements to the 'Resource' field.
    This dramatically reduces the duplication in the statement,
    and increases the chances of it being smaller than the limit.
    Use this new class in the `Pipeline` construct.
    
    Fixes aws#16244
    skinny85 committed Sep 2, 2021
    Copy the full SHA
    f6b47a5 View commit details
    Browse the repository at this point in the history