aws-cdk-lib: NestedStack reference of CustomResource with Fn results in "id.replace is not a function" #30130
Labels
@aws-cdk/custom-resources
Related to AWS CDK Custom Resources
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
When I pass a custom resource to a nested stack via props, and then use
getAttString()
on the custom resource with an input of something likeFn.ref(AWS::Region)
, when I callapp.synth()
, I getTypeError: id.replace is not a function
.Expected Behavior
I expect this to work as it does when the custom resource is created in the nested stack. This error does not occur if the custom resource is not passed across stacks via props.
Current Behavior
TypeError: id.replace is not a function
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.138.0 (build 6b41c8b)
Framework Version
No response
Node.js Version
v20.9.0
OS
darwin
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: