【发布时间】:2021-02-06 20:33:05
【问题描述】:
我尝试在云中部署一个新的 EC2 实例,但我收到错误“服务:AmazonEC2;状态代码:400;错误代码:不支持”
这是我的代码:
AWSTemplateFormatVersion: "2010-09-09"
Description: vm stack
Resources:
VMParameter:
Type: AWS::SSM::Parameter
Properties:
Name: Testing
Type: "String"
Value: !Ref VMerr
Description: The ID of the created VM
VMerr:
Type: AWS::EC2::Instance
Properties:
AvailabilityZone: us-east-1a
InstanceType: 't2.micro'
ImageId: ami-007a607c4abd192db
KeyName: pemtest
EbsOptimized: True
SubnetId: subnet-0ec24f346062f4527
SecurityGroupIds:
- sg-092f790dccf3ed4d3
BlockDeviceMappings:
- DeviceName: "/dev/sdm"
Ebs:
VolumeType: "io1"
Iops: "200"
DeleteOnTermination: "false"
VolumeSize: "20"
- DeviceName: "/dev/sdk"
NoDevice: {}
【问题讨论】:
-
在
us-east-1中运行,对吗?并且ami、subnet和securityGroup都在该帐户的us-east-1中?
标签: amazon-web-services amazon-ec2 yaml amazon-cloudformation