Skip to content

Commit 5d69352

Browse files
committed
Update documentation for Shared API Gateway
1 parent 202eba8 commit 5d69352

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ service: service-name
178178
provider:
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
184186
functions:
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
201203
functions:
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

0 commit comments

Comments
 (0)