Heroin and welcome back into this, you will be discussing about step functions now, step functions
are generally used in organizations, specifically for the orchestration of disorderlies functions like
the functions that Ranin Lamda.
Now, one of the questions that comes is specifically when you're using LAMDA for your application is
how can you turn or serverless into an application by itself?
So let's say that within this there are two lamda functions and what you want is once the lamda function,
one executes and complete successfully, then you want the lambda function to to be executed.
So only after lamda function one gets executed, then the Lamela function too will be called for.
So it's similar to once your payment is successfully done, then only the order will be shivved.
So the lambda function foresta should be executed successfully.
Then lambda function too would need to be done.
So let's take fumer example where you might have two lambda functions which are running in parallel
and output of both.
The lambda function should be sent to the lambda function three.
So only after lambda function one executes and lambda function to execute successfully, then the output
of both of them should be sent to the lambda function.
Very similar to that.
There can be a selection like, let's say lambda function one executes and depending upon what the output
data is, it should send it to either lambda function two or lambda function.
So this is also one of the important functions that you generally see a specificly organization which
are based on serverless and definitely coordinating lambda function is also important that you have
LAMAMRA function.
One, two, two, three, three, calling for, for calling five and so on.
And this is an entire workflow and you're a lot of thing happens like it might happen.
That lambda function too has an issue and it does not successfully run.
So what happens is that the overflow will break.
So after lamina function do or does not run, it will not function today.
So what we want is you want something like a great guy to block with.
Okay, so lambda function to denote node again, trendelenburg function to again.
Or if the function to the nurturant go back to the lambda function one execute the lambda function one
goldminer function two again.
So all of those attrite to block error handling everything is very important.
Typically when you are using a lambda for your entire application and this coordination, this coordination
between multiple components, so you see there are multiple components.
Each lambda function would be for a specific purpose and this entire coordination, along with error
handling to block.
If you try to do everything inside code, it will become much more larger and difficult to maintain.
So this coordination among multiple distributed components is handled by this step function.
No one great thing about step function is that it also provides the visual workflow.
So if you look into the workflow area, the workflow starts from this Sabeg job.
So this can be a lambda function.
It waits for X amount of seconds, then it goes to the gate job status, then it goes to job complete.
If the job is not complete, it goes to the job field lambda function.
If the job completes, it goes to the get a final job status.
And if it gets the final job status, then the application logic completes from you can even go back
to the status.
So all of this is actually a code which is written in step function.
However, this code is also shown in terms of visualization.
So let's understand this with a simple example about this that functions practically.
So I am in my AC2 and let's go to step functions and within the step functions.
If you see here, you have the entire workflow.
So all of the Geosung that you write in step function deusen logic.
The logic might be that first you should execute lambda function well, then execute the lambda function
too.
So whatever logic that you write in design does step function will give you that inner in a visual manner
so that it really becomes easy for you to understand on how exactly the workflow is so in order.
Start our first step, you need to click on get started and basically there are certain sample projects
we use the sample demo that you have over here, which is the Helliwell.
So let's give this the name of Hellewell.
And if you see here, you have stuck, you have hello, what do you have?
And so what it basically means is that that will go to Hollywood.
Now there isn't or you're the is sparse and the result is hello.
And then it goes to M so let's go ahead and do it next.
Now you need to create the AM also so let's give it the name of c h step function and we can go ahead
and create a state machine.
Now once the state machine is created, what you can go ahead and do, you can do a state execution
and just give it a name and start execution.
And once your execution has started, you know, the output is going to be helliwell because it was
part of the design document.
However, one important part to remember here is the visualization workflow so accurately since the
execution has completed successfully, you're getting a green aurier in case the execution had failed,
you would have to get a red here.
So let's say that you have instead of Hellewell or you can even link to a lambda function.
And if the lambda function fails, then you will get a red color over here so that you can easily detect
that.
All right, this lower lambda function has failed and this really becomes easier for a developer to
understand on where exactly the workflow has failed.
And this is the basics about step function that we need to know.
So that's about it at a very high level overview for this step functions.
I hope this video has been informative for you.
And I look forward to see you in the next video.