title: Cloudformation: AmazonEC2; Status Code: 400; Error Code: Unsupported
body: <p>I tried to deploy a new EC2 instance in cloud formation but I am getting the error &quot;Service: AmazonEC2; Status Code: 400; Error Code: Unsupported&quot;</p>
  <p>This is my code:</p>
  <pre><code>AWSTemplateFormatVersion: &quot;2010-09-09&quot;
  Description: vm stack
  
  Resources:
    VMParameter:
      Type: AWS::SSM::Parameter
      Properties:
        Name: Testing
        Type: &quot;String&quot;
        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: &quot;/dev/sdm&quot;
            Ebs: 
              VolumeType: &quot;io1&quot;
              Iops: &quot;200&quot;
              DeleteOnTermination: &quot;false&quot;
              VolumeSize: &quot;20&quot;
          - DeviceName: &quot;/dev/sdk&quot;
            NoDevice: {}
  </code></pre>