我有一个用于启动EC2实例的CloudFormation模板。
Parameters:
InstanceType:
Type: String
Description: Instance type for RStudio. Default is t2.micro.
AllowedValues:
- t2.micro
- t2.small
- t2.medium
- t2.large
ConstraintDescription: 'Valid instance type in the t2 family'
Default: t2.micro
ImageId:
Type: 'AWS::EC2::Image::Id'
Description: >-
Amazon Linux Image ID. Default is for 2017.03.01 (HVM). N.B.
Default: ami-4fffc834当我手动启动实例时,有一个添加存储的选项。默认是8 8gb,我想改成16 8gb。
我寻找了使用CloudFormation添加存储空间的语法。设置默认卷大小以外的其他卷大小的语法是什么?
发布于 2019-05-16 13:27:09
您需要像这样添加数据块设备映射...
"BlockDeviceMappings": [
{
"DeviceName": "/dev/xvda",
"Ebs": {
"DeleteOnTermination": true,
"VolumeType": "standard",
"VolumeSize": 16
}
}
]可以在这里找到一个有效的示例。
https://github.com/shantanuo/cloudformation/blob/master/security.template2.txt
https://stackoverflow.com/questions/56161272
复制相似问题