question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when validating template - property GatewayResponses not defined for resource of type AWS::Serverless::Api

See original GitHub issue

When running sam validate on example template at https://github.com/awslabs/serverless-application-model/blob/master/examples/2016-10-31/api_gateway_responses/template.yaml

I get the following result: Error: [InvalidResourceException('MyApi', 'property GatewayResponses not defined for resource of type AWS::Serverless::Api')] ('MyApi', 'property GatewayResponses not defined for resource of type AWS::Serverless::Api')

I would have expected this to validate. Using aws-sam-cli v0.16.1 I’m not sure how this correlates to serverless-application-model which has latest 1.11.0?

Also when running sam build I get the following error:

  File "/usr/local/lib/python3.7/site-packages/samcli/lib/samlib/wrapper.py", line 67, in run_plugins 
    parser.parse(template_copy, all_plugins)  # parse() will run all configured plugins 
  File "/usr/local/lib/python3.7/site-packages/samcli/lib/samlib/wrapper.py", line 134, in parse 
    raise InvalidDocumentException(document_errors) 
samtranslator.model.exceptions.InvalidDocumentException: [InvalidResourceException('AdaptApiGateway', 'property GatewayResponses not defined for resource of type AWS::Serverless::Api')] ```

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
awood45commented, Aug 12, 2019

This is going to be fixed with the next release, and other issues are open about the dependency upgrade. Closing this.

0reactions
awood45commented, Aug 6, 2019

We’re actively working on the aws-sam-translator dependency, and by extension this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

property GatewayResponses not defined for resource of type ...
Error when validating template - property GatewayResponses not defined for resource of type AWS::Serverless::Api #1198.
Read more >
Api - AWS Serverless Application Model - AWS Documentation
An AWS::Serverless::Api resource need not be explicitly added to a AWS Serverless Application Definition template. A resource of this type is implicitly ...
Read more >
Property StageName: not defined for resource of type AWS ...
Any ideas why StageName is not defined? Its clearly needed per AWS documentation. template.json { "AWSTemplateFormatVersion": "2010-09-09", ...
Read more >
How to quickly build an API with Lambda, API Gateway, and ...
The SAM template language provides seven resource types. ... For example, I can define a Lambda function using an AWS::Serverless::Function ...
Read more >
A Detailed Overview of AWS API Gateway - Alex DeBrie
Gateway response types; Key Takeaways from gateway responses ... You'll need to set the Request Validator property up top as well as specify ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found