gpt4 book ai didi

amazon-web-services - 有没有办法将现有的 EC2 实例移动到 cloudformation 堆栈

转载 作者:行者123 更新时间:2023-12-03 07:43:32 25 4
gpt4 key购买 nike

我有在 AWS 上运行的现有 EC2 实例。它是手动创建的。

有没有办法将现有实例移动到云形成堆栈并能够通过云形成进行更新?或者应该删除现有实例并由 Cloud Formation 创建新实例?

当我从模板创建新实例时。它在 AWS 上创建新实例。

最佳答案

是的!刚刚宣布...

来自New – Import Existing Resources into a CloudFormation Stack | AWS News Blog :

To import existing resources into a CloudFormation stack, you need to provide:

  • A template that describes the entire stack, including both the resources to import and (for existing stacks) the resources that are already part of the stack.
  • Each resource to import must have a DeletionPolicy attribute in the template. This enables easy reverting of the operation in a completely safe manner.
  • A unique identifier for each target resource, for example the name of the Amazon DynamoDB table or of the Amazon Simple Storage Service (S3) bucket you want to import.

因此,您需要编辑模板,然后将资源导入到堆栈中。

关于amazon-web-services - 有没有办法将现有的 EC2 实例移动到 cloudformation 堆栈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58694773/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com