【问题标题】:Creating a JSON Cloud Formation Template with an EC2 Instance that also attaches EBS volume...使用还附加 EBS 卷的 EC2 实例创建 JSON Cloud Formation 模板...
【发布时间】:2015-08-27 20:22:00
【问题描述】:

一般来说,我对编程很陌生......所以如果我的问题非常广泛,请原谅我,因为我真的不知道我在做什么。任何指导或指示将不胜感激!

【问题讨论】:

  • 请提供有关您迄今为止尝试过的内容以及您遇到的确切问题的信息。在您得到任何有用的答案之前,此类广泛而开放的问题可能会被标记为关闭

标签: templates cloud amazon


【解决方案1】:

取消我在一些在线培训视频中看到的内容;这就是我作为模板的基础/基础......我在正确的轨道上吗?老实说,我不知道我在做什么...... :(

AWS::EC2::Instance

{

    "Resources" : {`enter code here`
        "AWSCloudFormationTemplate" : {
            "Type" : "AWS::EC2::Instance"
        }
    }
}

{
    "Type" : "AWS::EC2::Instance",
    "Properties" : {
    "Availability Zone" : String,
    "BlockDeviceMappings" : [EC2 Block Device Mapping, ...],
    "Disabled ApiTermination" : Boolean,
    "Ebsptimized" : Boolean,
    "IamInstanceProfile" : String,
    "ImageId" : String,
    "InstanceInitiatedShutdownBehavior" : String,
    "InstanceType" : String,
    "KernelId" : String,
    "KeyName" : String,
    "Monitoring" : Boolean,
    "NetworkInterfaces" : [ EC2 Network Interface, ...],
    "PlacementGroupName" : String,
    "PrivateIpAddress" :  String,
    "RamdiskId" : String,
    "SecurityGroupIds" : [ String, ...],
    "SecurityGroups" : [String, ...],
    "SourceDestCheck" : Boolean,
    "SubnetId" :  String,
    "Tags" : [ Resource Tag, ...],
    "Tenancy" : String,
    "UserData" : String,
    "Volumes" : [EC2 MountPoint, ...],
    "AdditionalInfo" : String

    }


}
}

【讨论】:

    【解决方案2】:

    使用 BlockDeviceMappings 此片段将创建具有专用 200Gb SSD 卷的实例:

    “掌握” : { "类型" : "AWS::EC2::Instance", “特性” : { "标签":[{"Key":"Name", "Value":"MASTER"}], “SecurityGroups”:[{“Ref”:“InstanceSecurityGroup”}], “密钥名称”:“我的密钥”, “块设备映射”:[ { "设备名称": "/dev/sda1", “Ebs”:{ “体积”:“200”, “卷类型”:“io1”, “IOPS”:“2000” } } ], “ImageId”:“ami-a25415cb”, “InstanceType”:“m1.large” } }

    【讨论】:

      猜你喜欢
      • 2014-08-06
      • 2020-07-20
      • 1970-01-01
      • 2018-12-29
      • 1970-01-01
      • 2019-11-04
      • 2021-11-26
      • 2019-01-23
      • 1970-01-01
      相关资源
      最近更新 更多