File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,10 @@ service: service-name
178178provider:
179179 name: aws
180180 apiGateway:
181- restApiId: xxxxxxxxxx # REST API resource ID. Default is generated by the framework
182- restApiRootResourceId: xxxxxxxxxx # Root resource, represent as / path
181+ # REST API resource ID. Default is generated by the framework
182+ restApiId: xxxxxxxxxx
183+ # Root resource, represent as / path
184+ restApiRootResourceId: xxxxxxxxxx
183185
184186functions:
185187 ...
@@ -194,14 +196,25 @@ provider:
194196 apiGateway:
195197 restApiId: xxxxxxxxxx
196198 restApiRootResourceId: xxxxxxxxxx
197- restApiResources: # List of existing resources that were created in the REST API. This is required or the stack will be conflicted
198-
199- /posts : xxxxxxxxxx
199+ # List of existing resources that were created in the REST API. This is required or the stack will be conflicted
200+ restApiResources:
201+ /users : xxxxxxxxxx
200202
201203functions:
202204 ...
203205` ` `
204206
207+ Now we can define endpoints using existing API Gateway ressources
208+
209+ ` ` ` yml
210+ stepFunctions:
211+ stateMachines:
212+ hello:
213+ events:
214+ - http:
215+ path: users/create
216+ method: POST
217+ ` ` `
205218
206219# ### Enabling CORS
207220
You can’t perform that action at this time.
0 commit comments