1 Answer
- Newest
- Most votes
- Most comments
0
Hello there!
In order to pass the parameters from one state to the next, ensure that you are using the Pass state.
Let's say I have the parameters ClusterName
and ClusterId
and I need to pass it to the next state. In my state machine definition, it will like the following:
"GetInputFromLambda": {
"Comment": "This state gets the parameters from the Lambda function",
"Type": "Pass",
"Parameters": {
"ClusterID.$": "$.ClusterId", (this allows me to get the value defined in the Lambda function)
"ClusterName.$" : "$.ClusterName",
},
"Next": "DoSomethingWithLambdaInputState"
If I defined "ClusterID.$
" as "ClusterID
", I will get the literal string "$.ClusterId
", have a look at the example listed here. The values that I get from Lambda are passed on to the next state "DoSomethingWithLambdaInputState"
So if you change the name of the EMR cluster in your Lambda function, remember the key value pair so you can access it in the state machine.
answered a year ago
Relevant content
- Accepted Answerasked a year ago
- asked a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Thanks JB, So, will this one pass those parameters for the next step or all subsequent steps?