我正在使用以下“参数”代码来选择最新的AMI。它可以执行。
"Parameters" : {
"LatestAmiId" : {
"Type" : "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
"Default" : "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-ebs"
}},
是否有类似的方法来选择默认安全组的子网? 我不想提及这样的子网(或安全组)...
"SubnetId": "subnet-e8ecf09c, subnet-aa9dfc90, subnet-ce083188, subnet-718bd259",
更新:
我正在使用以下代码,并且失败,并显示错误“ SubnetId属性的值必须为String 类型”
{
"Parameters": {
"LatestAmiId": {
"Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
"Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs"
},
"myKeyPair" : {
"Description" : "Amazon EC2 Key Pair",
"Type" : "AWS::EC2::KeyPair::KeyName"
},
"mySubnetIDs" : {
"Description" : "Subnet IDs",
"Type" : "List<AWS::EC2::Subnet::Id>"
},
"Oksoftaccess":{
"Type":"AWS::SSM::Parameter::Value<String>",
"Default":"myEC2TypeDev"
},
"Oksoftsecret":{
"Type":"String",
"Default":"mysecret1"
}
},