我正在尝试使用带有aws-cdk的cloudformation模板创建服务目录产品。我的模板已经创建并存储在s3中。下面是我用来做这件事的示例代码
template_location = "".join(["https://s3.amazonaws.com/", S3_RESOURCES_BUCKET, "/", "template.json"])
sc.CfnCloudFormationProduct(scope, "SCProduct", name="SCProduct", owner="",
provisioning_artifact_parameters=[{"info": {"loadTemplateFromUrl": template_location}}])当我尝试合成时,我收到了这个错误:jsii.errors.JSIIError: No stack could be identified for the construct at path SCProduct
我在这里做错了什么?任何帮助都将不胜感激。
发布于 2019-11-22 18:11:34
你需要传递scope对象,而不是堆栈,通常它是self。
https://stackoverflow.com/questions/58965021
复制相似问题