Skip to content

Commit c6c7fcf

Browse files
docs: updated docs to add instruction about the IAM role
1 parent d7906b5 commit c6c7fcf

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,6 @@ stepFunctions:
315315
definition:
316316
```
317317

318-
#### HTTP Endpoint with Extended Options
319-
320318
Here You can define an POST endpoint for the path posts/create.
321319

322320
```yml
@@ -330,6 +328,22 @@ stepFunctions:
330328
definition:
331329
```
332330

331+
#### HTTP Endpoint with custom IAM Role
332+
333+
The plugin would generate an IAM Role for you by default. However, if you wish to use an IAM role that you have provisioned separately, then you can override the IAM Role like this:
334+
335+
```yml
336+
stepFunctions:
337+
stateMachines:
338+
hello:
339+
events:
340+
- http:
341+
path: posts/create
342+
method: POST
343+
iamRole: arn:aws:iam::<accountId>:role/<roleName>
344+
definition:
345+
```
346+
333347
#### Share API Gateway and API Resources
334348

335349
You can [share the same API Gateway](https://serverless.com/framework/docs/providers/aws/events/apigateway/#share-api-gateway-and-api-resources) between multiple projects by referencing its REST API ID and Root Resource ID in serverless.yml as follows:

0 commit comments

Comments
 (0)