You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can then `Ref: SendMessageStateMachine` in various parts of CloudFormation or serverless.yml
112
118
119
+
#### Depending on another logical id
120
+
If your state machine depends on another resource defined in your `serverless.yml` then you can add a `dependsOn` field to the state machine `definition`. This would add the `DependsOn`clause to the generated CloudFormation template.
121
+
122
+
This `dependsOn` field can be either a string, or an array of strings.
123
+
124
+
```yaml
125
+
stepFunctions:
126
+
stateMachines:
127
+
myStateMachine:
128
+
dependsOn: myDB
129
+
130
+
myOtherStateMachine:
131
+
dependsOn:
132
+
- myOtherDB
133
+
- myStream
134
+
```
135
+
113
136
#### Current Gotcha
114
137
Please keep this gotcha in mind if you want to reference the `name` from the `resources` section. To generate Logical ID for CloudFormation, the plugin transforms the specified name in serverless.yml based on the following scheme.
115
138
@@ -329,11 +352,11 @@ stepFunctions:
329
352
events:
330
353
- http:
331
354
path: /users
332
-
...
355
+
...
333
356
authorizer:
334
357
# Provide both type and authorizerId
335
358
type: COGNITO_USER_POOLS # TOKEN, CUSTOM or COGNITO_USER_POOLS, same as AWS Cloudformation documentation
336
-
authorizerId:
359
+
authorizerId:
337
360
Ref: ApiGatewayAuthorizer # or hard-code Authorizer ID
0 commit comments