课程: AWS for Developers: Step Functions

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Parsing parameters between transitions

Parsing parameters between transitions

- [Instructor] In this lesson, we're going to continue to expand our data. We're going to do this using a choice state and a great feature of step functions, which allows us to add data without having to write any additional code. Let's take a look. Here in this file we have, on line 17, a type choice, which means this state that we're about to add is of type choice, and it will make a decision based on this variable on line 21 that says $.Payload.body.distance, which is the value from our lambda function, remember that? We're going to compare that number that comes back from our lambda function with a few presets that we have. In this case, 100, 500, and greater than 500. Based on those choices, we will be sent to another state where we can add JSON data to our payload. For right now, let's just go ahead and select all of these. I'm going to copy this, and now let's go back to our step functions console. I'm going to select…

内容