title: At least one Resources member must be defined ...error in cloud formation ec2
body: <pre><code>I tried other templates from the net but still getting the same error. Error
  </code></pre>
  
  <p>message: Template contains errors.: Template format error: At least one Resources member must be defined.</p>
  
  <pre><code>{
  "AWSTemplateFormatVersion" : "2010-09-09",
  
  "Description" : "TTND AWS CloudFormation template to launch first instance",
  
  "Parameters" : {
  
  "KeyName" : {
  "Description" : "EC2 Key Pair for SSH Access",
  "Default" : "sample",
  "MinLength": "1",
  "MaxLength": "64",
  "AllowedPattern" : "[-_ a-zA-Z0-9]*",
  "ConstraintDescription" : "can contain only alphanumeric characters, spaces, dashes and underscores."
  },
  "InstanceType" : {
  "Description" : "Instance1 EC2 instance type",
  "Type" : "String",
  "Default" : "t2.micro",
  "AllowedValues" : [ "t2.micro","m1.small","m1.medium","m1.large"],
  "ConstraintDescription" : "must be a valid EC2 instance type."
  }
  },
  "Mappings" : {
      "AWSInstanceMapping" : {
        "t2.micro"    : { "Arch" : "64" },
        "t2.small"    : { "Arch" : "64" },
        "t2.medium"   : { "Arch" : "64" },
        "t2.large"    : { "Arch" : "64" },
        "m3.medium"   : { "Arch" : "64" },
        "m4.large"   : { "Arch" : "64" },
        "m4.xlarge"  : { "Arch" : "64" },
        "m4.2xlarge"  : { "Arch" : "64" }
      }
      },
  
      "InstanceAMI" : {
        "us-east-1"      : { "64" : "ami-09ca8e1e" }
      },
  </code></pre>
  
  <p>I tried other templates for net but same error I am getting </p>
  
  <pre><code>"Resources" : {
  
      "VPC" : {
        "Type" : "AWS::EC2::VPC",
        "Properties" : {
          "CidrBlock" : "10.0.0.0/16",
          "Tags" : [
            {"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} },
            { "Key": "Name", "Value": "Project_VPC"},
            {"Key" : "Network", "Value" : "Public" }
          ]
        }
      },
  
      "PublicSubnet" : {
        "Type" : "AWS::EC2::Subnet",
        "Properties" : {
          "VpcId" : { "Ref" : "VPC" },
          "CidrBlock" : "10.0.0.0/24",
          "Tags" : [
            {"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} },
            {"Key" : "Network", "Value" : "Public" },
            { "Key": "Name", "Value": "Project_Public_Subnet"}
          ]
        }
      },
  
      "InternetGateway" : {
        "Type" : "AWS::EC2::InternetGateway",
        "Properties" : {
          "Tags" : [
            {"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} },
            {"Key" : "Network", "Value" : "Public" },
            { "Key": "Name", "Value": "Project_Internetgateway"}
          ]
        }
      },
  
      "AttachGateway" : {
         "Type" : "AWS::EC2::VPCGatewayAttachment",
         "Properties" : {
           "VpcId" : { "Ref" : "VPC" },
           "InternetGatewayId" : { "Ref" : "InternetGateway" }
         }
      },
  "PublicRouteTable" : {
        "Type" : "AWS::EC2::RouteTable",
        "Properties" : {
          "VpcId" : {"Ref" : "VPC"},
          "Tags" : [
            {"Key" : "Application", "Value" : { "Ref" : "AWS::StackId"} },
            {"Key" : "Network", "Value" : "Public" },
            { "Key": "Name", "Value": "cloudwords_public_routetable"}
          ]
        }
      },                                                           
  </code></pre>
  
  <p>some of code I deleted for posting it is giving large code error so</p>
  
  <pre><code>"Outputs" : {
   "InstanceId" : {
   "Description" : "InstanceId of the newly created instance",
   "Value" : { "Ref" : "Instance" }
   },
      }
  }
  </code></pre>
  
  <p>If anyone has a simple template of Launching an AWS EC2 instance using CloudFormation Template please post</p>