studentneedshelp
studentneedshelp

Reputation: 53

Encountered unsupported property EBS

I'm having some issues with a Cloudformation Template where when I attempt to roll it out it keeps failing on the instance creation prompting the error ' Encountered unsupported property EBS' which in turn causes a rollback. I find this quite interesting because I appear to have all of the necessary properties in there at the moment:

Also Including some links that could help speed up the research: Instance Setup, Block Device Mapping, & Block Specific Properties

 Resources:  
   Web01:
    Type: AWS::EC2::Instance
    Properties:
            SecurityGroups: 
                        - Ref: SecurityGoupSocoDrELB
                        - Ref: SecurityGoupSocoDrData
            KeyName: 
                    Ref: KeyPairName
            ImageId: !FindInMap
                - RegionMap
                - Ref: "AWS::Region"
                - AMI
            Monitoring: 'false'
            SubnetId:
                    Ref: SocoDrSubnet02
            PrivateIpAddress: xxxxxxxx
            InstanceInitiatedShutdownBehavior: 'stop'
            InstanceType: 
                        Ref: InstanceType
             #I think the error occurs here-
            BlockDeviceMappings:
                - DeviceName: /dev/xvda
                - EBS:
                    DeleteOnTermination: 'true'
                    VolumeType: gp2
                    VolumeSize: '300'  

For reference I'm including other appropriate sections but the problem is stemming from the Resource's Instance section:

Parameters:
  KeyPairName:
    Description: The EC2 Key Pair to allow SSH access to the instance
    Type: AWS::EC2::KeyPair::KeyName

# INSTANCE
InstanceType:
    Type: String
    AllowedValues:
        - t2.nano
        - t2.micro
        - t2.small
        - t2.medium
        - t2.large
        - t2.xlarge
        - t2.2xlarge
    Default: t2.small
Mappings:
  RegionMap:
    us-east-2: 
        AMI: ami-014a7d64

Upvotes: 1

Views: 2013

Answers (1)

krishna_mee2004
krishna_mee2004

Reputation: 7366

The correct property is Ebs and not EBS. Documentation can be found here.

Upvotes: 1

Related Questions