core: referencing arrays/lists when using crossRegionReferences
fails with "SerializationException: Start of list found where not expected"
#31655
Labels
@aws-cdk/core
Related to core CDK functionality
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Describe the bug
When creating stacks with
crossRegionReferences
enabled, and the stack exposes a list/array value that is to be read in another region, theCustom::CrossRegionExportWriter
resource will fail during creation with the error "SerializationException: Start of list found where not expected". Reading string values works fine, but if it's an array/list, it will fail.Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
I expect to be able to reference lists/arrays from a stack in another region like I would strings.
Current Behavior
The
Custom::CrossRegionExportWriter
resource fails during creation with the error "SerializationException: Start of list found where not expected":Reproduction Steps
By default, the app will be created in a way that does not trigger the bug. To deploy the app as-is:
This should create the stacks successfully. Then run another deployment with a context variable:
This will instruct the app to reference list values in a cross-region manager and trigger the bug.
The bug occurs whether you create the stack with or without the context variable set; that is to say, if you create the stack with the context variable, the bug will also be triggered in that circumstance.
app.ts:
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.158.0
Framework Version
No response
Node.js Version
20.15.0
OS
macOS 14.6.1
Language
TypeScript
Language Version
5.5.4
Other information
No response
The text was updated successfully, but these errors were encountered: