Create AMI image as part of a cloudformation stack

后端 未结 4 589
温柔的废话
温柔的废话 2020-12-08 14:42

I want to create an EC2 cloudformation stack which basically can be described in the following steps:

1.- Launch instance

2.- Provision the instance

4条回答
  •  我在风中等你
    2020-12-08 15:19

    1. No.
    2. I suppose Yes. Once the stack you can use the "Update Stack" operation. You need to provide the full JSON template of the initial stack + your changes in that same file (Changed AMI) I would run this in a test environment first (not production), as I'm not really sure what the operation does to the existing instances.

    Why not create an AMI initially outside cloudformation and then use that AMI in your final cloudformation template ?

    Another option is to write some automation to create two cloudformation stacks and you can delete the first one once the AMI that you've created is finalized.

提交回复
热议问题