Skip to content

Commit 4c0103a

Browse files
Merge pull request #266 from hideokamoto/docs/map-example
docs: add map state example
2 parents 73d8e26 + 5d619ed commit 4c0103a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ This is the Serverless Framework plugin for AWS Step Functions.
5454
- [Parallel](#parallel)
5555
- [Catch Failure](#catch-failure)
5656
- [Choice](#choice)
57+
- [Map](#map)
5758

5859
## Install
5960

@@ -1321,3 +1322,41 @@ plugins:
13211322
- serverless-step-functions
13221323
- serverless-pseudo-parameters
13231324
```
1325+
1326+
### Map
1327+
1328+
```yaml
1329+
1330+
functions:
1331+
entry:
1332+
handler: handler.entry
1333+
mapTask:
1334+
handler: handler.mapTask
1335+
1336+
stepFunctions:
1337+
stateMachines:
1338+
yourMapMachine:
1339+
definition:
1340+
Comment: "A Map example of the Amazon States Language using an AWS Lambda Function"
1341+
StartAt: FirstState
1342+
States:
1343+
FirstState:
1344+
Type: Task
1345+
Resource:
1346+
Fn::GetAtt: [entry, Arn]
1347+
Next: mapped_task
1348+
mapped_task:
1349+
Type: Map
1350+
Iterator:
1351+
StartAt: FirstMapTask
1352+
States:
1353+
FirstMapTask:
1354+
Type: Task
1355+
Resource:
1356+
Fn::GetAtt: [mapTask, Arn]
1357+
End: true
1358+
End: true
1359+
1360+
plugins:
1361+
- serverless-step-functions
1362+
```

0 commit comments

Comments
 (0)