简体   繁体   English

如何仅在删除该 Cloud Formation 堆栈之前使用 Cloud Formation 创建 EC2 AMI?

[英]How to create EC2 AMI with Cloud Formation only before deleting that Cloud Formation stack?

My question here is I will be creating the EC2 instance using the cloud formation template, while deleting the stack I want to create the AMI of that EC2.我的问题是我将使用云形成模板创建 EC2 实例,同时删除我想要创建该 EC2 的 AMI 的堆栈。 I found some articles about how to create the AMI using the Cloud Formation template.我找到了一些关于如何使用 Cloud Formation 模板创建 AMI 的文章。 But before deleting the stack How can I send signal to Cloud Formation to create AMI before deleting that EC2 instance.但是在删除堆栈之前如何在删除该 EC2 实例之前向 Cloud Formation 发送信号以创建 AMI。 For RDS, EBS volumes and some others have Deletion policy, where we can specify Retain or snapshot to leave the resource to be deleted or create snapshot of that respectively.对于 RDS、EBS 卷和其他一些有删除策略,我们可以在其中指定 Retain 或快照以保留要删除的资源或分别为其创建快照。 Can someone help with this or you if you find some article point me to that direction.如果您找到一些文章指向我的方向,有人可以帮助您或您吗?

Thank you.谢谢你。

You need a custom resource which responds to the following events:您需要一个响应以下事件的自定义资源

Supports the Create, Read, Update, Delete , and List (CRUDL) operations支持创建、读取、更新、删除和列表 (CRUDL) 操作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从云形成中创建给定 EC2 的 AMI - Create AMI of a given EC2 from cloud formation Marklogic 使用云形成模板在 EC2 中按比例缩小 - Marklogic Scaling down in EC2 using cloud formation Template 是否可以使用云形成在未过时的 EC2 映像上部署 Cloud9 ide? - Is it possible to use cloud formation to deploy a Cloud9 ide on an EC2 image that is not obsolete? 将现有 AWS 机密引入 Cloud Formation 堆栈 - Bring existing AWS secrets into Cloud Formation stack 如何停止当前在云形成中运行的所有堆栈操作? - How to stop all stack operations currently running in cloud formation? 删除 AWS 云形成堆栈及其创建的资源 - Delete AWS Cloud formation stack with resources created by it 获取云形成错误属性 InstanceId 的值必须是字符串类型,同时将 eip 附加到 ec2 - Getting cloud formation error Value of property InstanceId must be of type String while attaching eip with ec2 通过云形成创建 SQS 策略失败 - SQS policy failed to create via cloud formation 无法使用云形成创建lambda function - Unable to create lambda function using cloud formation 在 AWS Cloud Formation 模板中创建嵌套 If else - Create Nested If else in AWS Cloud Formation Template
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM