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
117
118
+
#### Depending on another logical id
119
+
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.
120
+
121
+
This `dependsOn` field can be either a string, or an array of strings.
122
+
123
+
```yaml
124
+
stepFunctions:
125
+
stateMachines:
126
+
myStateMachine:
127
+
dependsOn: myDB
128
+
129
+
myOtherStateMachine:
130
+
dependsOn:
131
+
- myOtherDB
132
+
- myStream
133
+
```
134
+
113
135
#### Current Gotcha
114
136
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
137
@@ -329,11 +351,11 @@ stepFunctions:
329
351
events:
330
352
- http:
331
353
path: /users
332
-
...
354
+
...
333
355
authorizer:
334
356
# Provide both type and authorizerId
335
357
type: COGNITO_USER_POOLS # TOKEN, CUSTOM or COGNITO_USER_POOLS, same as AWS Cloudformation documentation
336
-
authorizerId:
358
+
authorizerId:
337
359
Ref: ApiGatewayAuthorizer # or hard-code Authorizer ID
0 commit comments