title: AWS CloudFormation w/ AWS::ApiGateway::RestApi gives Invalid REST API identifier specified
body: <p>I'm attempting to create an <code>AWS::ApiGateway::RestApi</code> resource using CloudFormation but when running</p>
  
  <blockquote>
    <p>aws cloudformation deploy --template-file lorem.json --stack-name lorem</p>
  </blockquote>
  
  <p>This ends up failing and upon looking in the CloudFormation console I see that the error is <code>Invalid REST API identifier specified</code>. </p>
  
  <p><a href="https://i.stack.imgur.com/Zbp0I.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Zbp0I.png" alt="enter image description here"></a></p>
  
  <p>Here is my <code>lorem.json</code> file:</p>
  
  <pre><code>{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "lorem.io Stack",
    "Resources": {
      "API": {
        "Type" : "AWS::ApiGateway::RestApi",
        "Properties" : {
          "FailOnWarnings": true,
          "BodyS3Location": {
            "Bucket": "cloudformation.lorem.io",
            "Key": "open-api.json"
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>Here I'm specifying <code>BodyS3Location</code> which points at an S3 object that contains the following:</p>
  
  <pre><code>{
    "swagger": "2.0",
    "info": {
      "title": "Lorem.IO API",
      "version": "1.0.0"
    },
    "definitions": {
      "Generator": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          }
        }
      }
    },
    "produces": [
      "application/json"
    ],
    "paths": {
      "/generators": {
        "get": {
          "responses": {
            "200": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/Generator"
                }
              }
            }
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>Because I'm providing this file according to the <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html#cfn-apigateway-restapi-name" rel="noreferrer">documentation</a> I shouldn't have to provide the name of the RestApi so I don't think that's the problem. Any idea on how I would go about debugging exactly what it's unhappy about?</p>
  
  <h2>Update #1</h2>
  
  <p>I've stripped out a lot of my configuration so that the only property that I'm now specifying is <code>name</code> and I still get the same error (<code>Invalid REST API identifier specified</code>): </p>
  
  <pre><code>{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "lorem.io Stack",
    "Resources": {
      "API": {
        "Type" : "AWS::ApiGateway::RestApi",
        "Properties" : {
          "FailOnWarnings": true,
          "Name": "Hello World"
        }
      }
    }
  }
  </code></pre>
  
  <p>According to the <a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html#cfn-apigateway-restapi-name" rel="noreferrer">documentation</a> <code>Name</code> is the only required attribute - Is this a bug w/ CloudFormation or am I missing something?</p>