-
Notifications
You must be signed in to change notification settings - Fork 4k
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
core: crossRegionReferences generates too large buildspec in FileAsset #30326
Comments
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 #29592 and it has a .zip file with fully functional TypeScript code attached. |
agree with your sggested workaround @HansFalkenberg-Visma . |
This is affecting us as well. |
@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. |
We are deploying stack to a lot of other AWS accounts and faced the same problem. Adding next property to the pipeline CDK solved the issue
|
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
The text was updated successfully, but these errors were encountered: