AWS SAM: The REST API doesn't contain any methods

0

Hello,

I'm getting started with AWS SAM, and built a simple deployment based on this example from Amazon:
https://github.com/awslabs/serverless-application-model/blob/master/examples/2016-10-31/api_swagger_cors/template.yaml .

My (very similar) code is available there:
https://gist.github.com/pierreis/ca0c4fbe3a1f60a5729d386511d37fd8

When deploying, I am getting the following message: The REST API doesn't contain any methods (Service: AmazonApiGateway; Status Code: 400; Error Code: BadRequestException)

Checking online for this error, I find many occurrences, but they seem to be related to manually creating a deployment, which I am not doing here.

My code being extremely similar to the Amazon example, I cannot pinpoint the error.

Thanks.

1개 답변
1

I did continue investigating the issue, and it seems that the error is indeed mine: Swagger definition requires to define methods in the body directly ; I just wanted to use it to create the resource policy.

Looks like I'm waiting for this:
https://github.com/awslabs/serverless-application-model/issues/514

Univ
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인