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.

Univ
已提問 5 年前檢視次數 1945 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南