While developing a custom construct cdk library, if a NestedStack is used and we are testing locally using npm link o similar, the NestedStack will not be prepared this will cause the error "TemplateURL must be an Amazon S3 URL".
This applies to cdk > 1.28.0 and it is due to a bug in the Construct library , I have submitted a issue and the fix hoping that it could be integrated (https://github.com/aws/constructs/issues/32)
As a temporary workaround could be used instead of using npm link
npm pack npm install yourlib.tar.gz I know that is not a bug strictly related to cdk, but I have created the bug as a reference.
Just write a cdk library containing a NestedStack, then try to npm link it
"TemplateURL must be an Amazon S3 URL" for a NestedStack
This is :bug: Bug Report
This is also an issue for stack imports with normal stacks. An example project is available here showcasing the issue https://github.com/AlexCheema/cdk-cross-lib-stacks
hey @apalumbo - saw that https://github.com/aws/constructs/pull/33 was merged a while back, is this issue still needed?
I think it would also take care of your issue @AlexCheema
@shivlaks merge aws/constructs#33 fixes the issue, so it can be closed