@@ -18,7 +18,7 @@ plugins:
18
18
19
19
## Setup
20
20
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.
22
22
Of course, you can also specify arn directly.
23
23
24
24
` ` ` yml
@@ -28,31 +28,70 @@ functions:
28
28
29
29
stepFunctions:
30
30
stateMachines:
31
- hellostepfunc :
31
+ hellostepfunc1 :
32
32
Comment: "A Hello World example of the Amazon States Language using an AWS Lambda Function"
33
- StartAt: HelloWorld
33
+ StartAt: HelloWorld1
34
34
States:
35
- HelloWorld:
35
+ HelloWorld1:
36
36
Type: Task
37
37
Resource: hellofunc
38
38
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
39
49
` ` `
40
50
41
51
# # Command
42
52
# ## deploy
43
- # ### All StateMachines deploy
53
+ # ### All StateMachines and Activities deploy
44
54
```
45
55
$ sls deploy stepf
46
56
```
47
57
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
+
48
71
#### Single StateMachine deploy
49
72
```
50
- $ sls deploy stepf --state <stepfunctionname >
73
+ $ sls deploy stepf statemachines --name <stepfunctionname >
51
74
```
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.
52
79
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.
54
88
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.
56
95
- --stage or -s The stage in your service you want to deploy your step function.
57
96
- --region or -r The region in your stage that you want to deploy your step function.
58
97
@@ -69,12 +108,25 @@ $ sls invoke stepf --state <stepfunctionname> --data '{"foo":"bar"}'
69
108
```
70
109
71
110
### remove
72
- #### All StateMachines remove
111
+ #### All StateMachines and Activities remove
73
112
74
113
```
75
114
$ sls remove stepf
76
115
```
77
116
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
+
78
130
#### Single StateMachine remove
79
131
80
132
```
@@ -87,6 +139,25 @@ $ sls remove stepf --state <stepfunctionname>
87
139
- --stage or -s The stage in your service you want to invoke your step remove.
88
140
- --region or -r The region in your stage that you want to invoke your step remove.
89
141
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
+
90
161
## Sample statemachines setting in serverless.yml
91
162
### Waite State
92
163
```yml
0 commit comments