Cloudformation:导入现有资源

Cloudformation: Import existing resource

我已经使用 cdk 调用了调用 lambda 的自定义 cloudformation。 lambda 在内部创建的资源很少。我使用 AWS SDK 创建了这些资源。在创建资源之前有一些逻辑。这使得公司运营团队很难看到作为堆栈的一部分创建的确切内容。

我确实收到了一些 LogicalResourceId、PhysicalResourceId 和 StackId。 有什么方法可以导入回在 lambda 中创建的资源吗? 我可以使用这个 stackId 将在 lambda 中创建的资源拼接回 cloudformation 堆栈吗?

没有自动化的方法。你必须 manually import those resources, if possible as not all resources can be imported, to CFN. This requires writing all the templates for the resources before hand. Good help with that is former2.