简体   繁体   English

AWS::CloudFormation::Init 未安装软件包

[英]AWS::CloudFormation::Init not installing package

I'm trying to install a package when my EC2 instance initializes without success.当我的 EC2 实例初始化没有成功时,我正在尝试安装一个程序包。 CloudFormation doesn't throw any errors, but the package is not installed. CloudFormation 不会引发任何错误,但未安装该软件包。 What am I doing wrong?我究竟做错了什么?

Here is my template:这是我的模板:

AWSTemplateFormatVersion: "2010-09-09"
Description: "MyCoolServer"
Resources:
  EC2Instance:
    Type: AWS::EC2::Instance
    Metadata:
      AWS::CloudFormation::Init:
        config:
          packages:
            apt:
              python: []
...

cfn-init function is now installed in your Ubuntu AMI. cfn-init函数现在已安装在您的 Ubuntu AMI 中。 Then it doesn't execute.然后它不执行。

cfn-helper utilities are automatically installed only in the latest Amazon Linux AMI. cfn-helper实用程序仅自动安装在最新的 Amazon Linux AMI 中。

More details follow this answer.更多细节遵循这个答案。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM