File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -125,3 +125,34 @@ stepFunctions:
125125 role: arn:aws:iam::xxxxxxxx:role/yourRole
126126 definition:
127127```
128+ ## Tips
129+ ### How to specify the stateMachine ARN to environment variables
130+ Here is serverless.yml sample to specify the stateMachine ARN to environment variables.
131+ This makes it possible to trigger your statemachine through Lambda events
132+
133+ ``` yml
134+ functions :
135+ hello :
136+ handler : handler.hello
137+ hello :
138+ handler : handler.hello2
139+ environment :
140+ statemachine_arn : ${self:resources.Outputs.HelloStepfunc.Value}
141+
142+ stepFunctions :
143+ stateMachines :
144+ hellostepfunc :
145+ definition :
146+ <your definition>
147+
148+ resources :
149+ Outputs :
150+ HelloStepfunc :
151+ Description : The ARN of the example state machine
152+ Value :
153+ Ref : HellostepfuncStepFunctionsStateMachine
154+
155+ plugins :
156+ - serverless-step-functions
157+ ` ` `
158+
You can’t perform that action at this time.
0 commit comments