简体   繁体   English

我可以将AWS CloudFormation与自定义AMI一起使用吗?

[英]Can I use AWS CloudFormation with a custom AMI?

I want to use an AMI that have not been created from a snapshot. 我想使用尚未从快照创建的AMI。 The AMI was created using a virtual machine and then I used CLI tools to create the instance and the AMI. AMI是使用虚拟机创建的,然后我使用CLI工具创建实例和AMI。

This instance have installed cloud-init. 此实例已安装cloud-init。 Could I use this AMI to create instances using cloudformation? 我可以使用此AMI使用cloudformation创建实例吗? Do I need to install more software to use that service? 我是否需要安装更多软件才能使用该服务?

Thanks! 谢谢!

Yes, definitely, that is a very common use case: 是的,当然,这是一个非常常见的用例:

Amazon Web Services (AWS) publishes many Amazon Machine Images (AMIs) that contain common software configurations for public use. 亚马逊网络服务(AWS)发布了许多包含用于公共用途的通用软件配置的亚马逊机器映像(AMI)。 In addition, the AWS developer community has published many custom AMIs. 此外,AWS开发人员社区已发布了许多自定义AMI。 You can also create your own custom AMIs so that you can quickly and easily start new instances that have everything you need for your application. 您还可以创建自己的自定义AMI,以便快速轻松地启动具有应用程序所需一切的新实例。 For example, if your application is a website or a web service, your AMI could include a web server, the associated static content, and the code for the dynamic pages. 例如,如果您的应用程序是网站或Web服务,则您的AMI可能包括Web服务器,关联的静态内容以及动态页面的代码。 After you launch an instance with this AMI, your application is running and ready to accept requests. 使用此AMI启动实例后,您的应用程序正在运行并准备接受请求。

https://s3.amazonaws.com/cloudformation-examples/BoostrappingApplicationsWithAWSCloudFormation.pdf https://s3.amazonaws.com/cloudformation-examples/BoostrappingApplicationsWithAWSCloudFormation.pdf

Should you plan to use Cloudformation:Init inside your template to add additional configuration when your instance will start, be sure to install cfn tools as well (cfn-init, cfn-hup, cfn-signal...) 如果您打算在模板中使用Cloudformation:Init来在实例启动时添加其他配置,请务必同时安装cfn工具(cfn-init,cfn-hup,cfn-signal ......)

More details about Cloudformation:Init : http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-init.html 有关Cloudformation的更多详细信息:Init: http ://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-init.html

How to install cfn helper scripts : http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-helper-scripts-reference.html 如何安装cfn帮助程序脚本: http ://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-helper-scripts-reference.html

Yes. 是。

When you are specifying the instance in the cloud formation script you can use "ImageID": "" <- put in the AMI ID 在云编队脚本中指定实例时,可以使用“ImageID”:“”< - 放入AMI ID

ImageId 图像标识

Provides the unique ID of the Amazon Machine Image (AMI) that was assigned during registration.

Required: Yes

Type: String

Update requires: Replacement

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

相关问题 过滤自定义实例ID(AMI)以在cloudformation中使用 - Filtering Custom Instance Id (AMI) to use in cloudformation AWS Cloudformation Userdata powershell 脚本未在自定义 Windows Server AMI 上运行 - AWS Cloudformation Userdata powershell script not running on custom Windows Server AMI 使用自定义AMI时AWS EMR设置失败 - AWS EMR provisioning fails when I use custom AMI CloudFormation - 始终使用最新的 AMI - CloudFormation - always use latest AMI 我可以使用Cloudformation将AMI迁移到其他区域吗? - Can I migrate an AMI to a different region using Cloudformation? aws cloudformation 如何在映射块中使用条件? - aws cloudformation how can I use conditions in the mapping block? 我可以在 AWS Cloudformation json 模板的“参数”中使用“Fn::Join”吗 - Can I use "Fn::Join" in "Parameters" of AWS Cloudformation json template AWS CloudFormation:如何使用参数来形成字符串? - AWS CloudFormation: how can I use parameters to form strings? AWS CloudFormation CodeBuild:我可以使用 ECR 图像作为环境图像吗 - AWS CloudFormation CodeBuild: Can i use ECR image as Environment image 我可以使用 AWS-UpdateLinuxAmi AWS SSM 文档基于最新的 amazon linux 2 构建 AMI 吗? - Can I use the AWS-UpdateLinuxAmi AWS SSM Document to build AMI based on latest amazon linux 2?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM