-
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
[cdk-pipelines] Pipeline template grows very fast reaching the 460,800 bytes limit from CloudFormation #9225
Comments
This sounds related to #9066, but possibly broader in scope. |
I ran into same exact problem. Here is the github issue I created - #9237. Is there any workaround for this problem, until further fix to it ? |
This change combines the two roles (and policies) per pipeline asset into a single role + policy for all assets in a pipeline. In a small pipeline with only 3 assets, this reduced the overall template size by a third. With a pipeline stack with 30 assets, this change reduces the template size from 363111 bytes to 190223 bytes. Tested on a cross-account pipeline to verify permissions were retained. fixes #9066 mitigates #9225 mitigates #9237
…ies (#9243) This change combines the two roles (and policies) per pipeline asset into a single role + policy for all assets in a pipeline. In a small pipeline with only 3 assets, this reduced the overall template size by a third. With a pipeline stack with 30 assets, this change reduces the template size from 363111 bytes to 190223 bytes. Tested on a cross-account pipeline to verify permissions were retained. fixes #9066 mitigates #9225 mitigates #9237 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
I just merged a change (#9243) that should help with this issue. Given your description (14 stacks, 25 including nested stacks, and 27 assets), I'm not 100% sure that it will be enough, but it should significantly help. (With even just 10 assets, this change cut the template size in half). The fix will go out in the next release; once it does, I would appreciate any feedback on if it was sufficient to solve the problem for you, or if more work is necessary. Thanks! |
Thank you so much for taking care of this and for doing it so quickly. I would keep a very close eye and give it a try as soon as it is released and get back to you with specific numbers. |
@njlynch Thanks for providing the fix in a short period of time. Do you know when this will be released? |
Soon! We typically release once a week. |
I've got about 10 stacks with around 30 - 40 assets, with more to come. So we'll see. 🤞 I'll keep you updated. |
@seawatts - Thanks for the quick turn-around and feedback. We'll investigate the new issue with the policy size. |
As a first test, we went by deploying the new version it to a fresh new account and it seems to work now, we are not getting the policy limit mentioned by @seawatts. However I won't totally discard it. I will post back once we run it in the pipeline that is nearly below the 460,800 bytes limit |
I correct myself, we also hit the Maximum policy size of 10240 bytes exceeded |
That's my thought process to overcome to issue. Unfortunately, I'm in the same boat as you're on with stack dependency. |
Great news! Thanks again for getting it done so fast |
Super awesome!!! 🙏🏻 |
CDK 1.56.0 was released on Friday; please do let us know if this solved the issue for you. |
@njlynch I'm possibly running into #9353
|
We deployed version 1.56.0 successfully with 31 assets being generated in the Assets stage. I guess this will buy us enough time for the root cause to be addressed. Thanks @njlynch |
…ies (aws#9243) This change combines the two roles (and policies) per pipeline asset into a single role + policy for all assets in a pipeline. In a small pipeline with only 3 assets, this reduced the overall template size by a third. With a pipeline stack with 30 assets, this change reduces the template size from 363111 bytes to 190223 bytes. Tested on a cross-account pipeline to verify permissions were retained. fixes aws#9066 mitigates aws#9225 mitigates aws#9237 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
❓ General Issue
The Question
After adding around 14 stacks (25 counting nested stacks) to a single Pipeline Application (Stage) the pipeline references 27 assets and the template grows above CloudFormation's 460,800 bytes limit, blocking the pipeline and making it unusable.
Is there a way to avoid this by compressing the generated template or by splitting it somehow? I'm facing this on a staging stage and production is way bigger
My suspicion is that the assets make the template grow too fast as each of them generates a build action with the whole chain of roles, policies, etc.
Environment
The text was updated successfully, but these errors were encountered: