Skip to content

Commit d356c0e

Browse files
authored
Update README.md
1 parent 640a5ec commit d356c0e

File tree

1 file changed

+80
-9
lines changed

1 file changed

+80
-9
lines changed

README.md

Lines changed: 80 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ plugins:
1818
1919
## Setup
2020
Write definitions yaml using Amazon States Language in a `stepFunctions` statement in serverless.yml.
21-
`Resource` statements refer to `functions` statements. Therefore, you do not need to write a function arn directly.
21+
`Resource` statements refer to `functions` or `activities` statements. Therefore, you do not need to write a function arn or activity arn directly.
2222
Of course, you can also specify arn directly.
2323

2424
```yml
@@ -28,31 +28,70 @@ functions:
2828
2929
stepFunctions:
3030
stateMachines:
31-
hellostepfunc:
31+
hellostepfunc1:
3232
Comment: "A Hello World example of the Amazon States Language using an AWS Lambda Function"
33-
StartAt: HelloWorld
33+
StartAt: HelloWorld1
3434
States:
35-
HelloWorld:
35+
HelloWorld1:
3636
Type: Task
3737
Resource: hellofunc
3838
End: true
39+
hellostepfunc2:
40+
StartAt: HelloWorld2
41+
States:
42+
HelloWorld2:
43+
Type: Task
44+
Resource: myTask
45+
End: true
46+
activities
47+
- myTask
48+
- yourTask
3949
```
4050

4151
## Command
4252
### deploy
43-
#### All StateMachines deploy
53+
#### All StateMachines and Activities deploy
4454
```
4555
$ sls deploy stepf
4656
```
4757
58+
##### options
59+
- --stage or -s The stage in your service you want to deploy your step function.
60+
- --region or -r The region in your stage that you want to deploy your step function.
61+
62+
#### All StateMachines deploy
63+
```
64+
$ sls deploy stepf statemachines
65+
```
66+
67+
##### options
68+
- --stage or -s The stage in your service you want to deploy your step function.
69+
- --region or -r The region in your stage that you want to deploy your step function.
70+
4871
#### Single StateMachine deploy
4972
```
50-
$ sls deploy stepf --state <stepfunctionname>
73+
$ sls deploy stepf statemachines --name <stepfunctionname>
5174
```
75+
##### options
76+
- --name or -n The name of the step function in your service that you want to deploy.
77+
- --stage or -s The stage in your service you want to deploy your step function.
78+
- --region or -r The region in your stage that you want to deploy your step function.
5279
53-
#### options
80+
#### All Activities deploy
81+
```
82+
$ sls deploy stepf activities
83+
```
84+
85+
##### options
86+
- --stage or -s The stage in your service you want to deploy your step function.
87+
- --region or -r The region in your stage that you want to deploy your step function.
5488
55-
- --state or -t The name of the step function in your service that you want to deploy.
89+
#### Single Activity deploy
90+
```
91+
$ sls deploy stepf activities --name <activityname>
92+
```
93+
##### options
94+
- --name or -n The name of the step function in your service that you want to deploy.
5695
- --stage or -s The stage in your service you want to deploy your step function.
5796
- --region or -r The region in your stage that you want to deploy your step function.
5897
@@ -69,12 +108,25 @@ $ sls invoke stepf --state <stepfunctionname> --data '{"foo":"bar"}'
69108
```
70109
71110
### remove
72-
#### All StateMachines remove
111+
#### All StateMachines and Activities remove
73112
74113
```
75114
$ sls remove stepf
76115
```
77116
117+
##### options
118+
- --stage or -s The stage in your service you want to deploy your step function.
119+
- --region or -r The region in your stage that you want to deploy your step function.
120+
121+
#### All StateMachines remove
122+
```
123+
$ sls remove stepf statemachines
124+
```
125+
126+
##### options
127+
- --stage or -s The stage in your service you want to deploy your step function.
128+
- --region or -r The region in your stage that you want to deploy your step function.
129+
78130
#### Single StateMachine remove
79131
80132
```
@@ -87,6 +139,25 @@ $ sls remove stepf --state <stepfunctionname>
87139
- --stage or -s The stage in your service you want to invoke your step remove.
88140
- --region or -r The region in your stage that you want to invoke your step remove.
89141
142+
#### All Activities remove
143+
```
144+
$ sls remove stepf activities
145+
```
146+
147+
##### options
148+
- --stage or -s The stage in your service you want to deploy your step function.
149+
- --region or -r The region in your stage that you want to deploy your step function.
150+
151+
#### Single Activity remove
152+
```
153+
$ sls remove stepf activities --name <activityname>
154+
```
155+
##### options
156+
- --name or -n The name of the step function in your service that you want to deploy.
157+
- --stage or -s The stage in your service you want to deploy your step function.
158+
- --region or -r The region in your stage that you want to deploy your step function.
159+
160+
90161
## Sample statemachines setting in serverless.yml
91162
### Waite State
92163
```yml

0 commit comments

Comments
 (0)