(core): crossRegionReferences
generates unnecessarily long SSM parameter names leading to deployment failures
#30119
Labels
Describe the bug
When using
crossRegionReferences
the producing stack creates SSM Parameters in the consuming region for each exported value. This is accomplished via this codeaws-cdk/packages/aws-cdk-lib/core/lib/private/refs.ts
Lines 248 to 263 in 2779b5e
Expected Behavior
crossRegionReferences
doesn't generate unnecessarily long SSM parameter names.Current Behavior
crossRegionReferences
generates SSM parameters with the name/cdk/exports/{consumingStackName}/{export-name}
. For users using nested stacks or for users with longer stack names (or both), the parameter names can become unnecessarily long which can result in deployment failures.Reproduction Steps
Possible Solution
crossRegionReferences
is an experimental feature. We may want to consider updating the SSM parameter names being generated to be limited to a certain length. This would break existing customers, though. Ideally, we could find a way to give users a choice to optionally limit the parameter name length. While this doesn't help us get around the 4096 byte limitation for custom resource provider response objects, it would reduce the chances of a deployment failure by limiting the response body size.Additional Information/Context
No response
CDK CLI Version
2.136.0
Framework Version
No response
Node.js Version
20.11.0
OS
MacOS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: