An error occurred: ApiGatewayDeployment - No integration defined formethod
The problem was not the bug from the Serverless side, but was originated with manually created resource without integration defined for the POST method:
Anerroroccurred(NotFoundException)whencallingtheGetIntegrationoperation: No integration defined formethod
After removing the resource. The deployment works again.
In conclusion, if there is a resource and one of its method has no integration, the REST API cannot be deployed. Either removing the resource or creating an integration will resolve the problem.
The following script will look for a REST API for no integration error:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
#
# Search Amazon API Gateway for resources that have no integration defined for