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 年前1952 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则