Open HansFalkenberg-Visma opened 3 months ago
Faced same issue today. Any workarounds?
I happened to be in the fortunate situation that is was possible to split deployment of a group of the accounts into a different pipeline. So even though I didn't really want a separate pipeline for this it wasn't a huge imposition either.
If that's not possible for you, I guess you could always manually manipulate the pipeline template and split the BuildSpec into two different actions as CDK should have done for you. If you want a starting point for that, I've done such manipulation for a totally different reason in https://github.com/aws/aws-cdk/issues/29592 and it has a .zip file with fully functional TypeScript code attached.
agree with your sggested workaround @HansFalkenberg-Visma . Marking the issue for further consideration by the team
This is affecting us as well. We are deploying a basic hygiene stack to all our accounts which ensure compliance, kills zombie resources, support integration tests, etc. We are deploying to 27 regions and 7 accounts and facing the same problem. We are splitting the pipeline into multiple pipeline to bypass this issue for now. Requesting the team to prioritize this.
@cygnius, Since this has a workaround, it won't be possible to prioritise this and bypass other high priority issue for now. Please feel free to create an Internal SIM ticket through AWS Premium Support or TAMs ,if this issue needs IMMEDIATE prioritization from your side. Other way to get prioritisation on Github is through Upvotes. Users who are facing this issue, can upvote this issue and this should soon be considered by the team.
Describe the bug
Cross region references rely on using Lambda functions, which are deployed with the stack.
I am deploying to 17 regions with a mix of importing and exporting, so there will be 17 export writer functions and 17 readers. Per the 8 accounts I want to deploy to.
All
cdk-asset
deploys of the same Lambda is being done in a single FileAssetXx action. This fails because its build spec becomes too large.The problem is somewhat lessened because -- I found --
cdk-asset
will only be invoked once per environment (account:region) even if multiple stacks use it in that environment. This behavior is not obvious because a stack's ID is part of the command.But it is still possible to exceed the limit even when deploying only to 3 accounts, if deploying to all 29 regions and having IDs that are not super short.
Expected Behavior
Cross region references in a pipeline are not limited by number of regions and accounts.
Current Behavior
Reproduction Steps
The resulting BuildSpec is about 32k. Even if only deploying to 3 accounts (a not uncommon pattern with ['test'], 'staging', 'production' and 'pipeline') it would be possible to exceed 25600 if identifiers were 20 characters longer than this example.
Possible Solution
Split into multiple FileAction actions if build spec becomes too large.
Additional Information/Context
No response
CDK CLI Version
2.143.0 (build 9f2bdf7)
Framework Version
No response
Node.js Version
v18.18.2
OS
Windows 10 Version 22H2
Language
TypeScript
Language Version
No response
Other information
No response