title: Setting an empty GatewayResponse (just status code) in AWS API Gateway
body: <p>Is there a way to set a GatewayResponse for an API Gateway in Cloudformation, with an empty response body (and ideally without response Content-Type)</p>
  
  <p>I have tried with something like this:</p>
  
  <pre><code>  InvalidApiKeyResponse:
      Type: AWS::ApiGateway::GatewayResponse
      Properties:
        ResponseType: INVALID_API_KEY
        RestApiId: !Ref RestApi
        StatusCode: 403
  </code></pre>
  
  <p>but it still returns the default application/json response.</p>
  
  <p>In the AWS dashboard, when I try to set an empty response I get the following error: Invalid null or empty value in responseTemplates</p>