Advantage of Using AWS Step funtions over (lambda calling lambda)

Viewed 593

My use case is invoke two lambdas L1, L2 First Lambda L1 is invoked when a file is created/uploaded in s3 location using S3 trigger and second Lambda L2 should be invoked after execution of L1

At the end of RequestHandler for L1 I'm planning to invoke L2

What is the advantage of using step functions here instead of just calling lambda from lambda and If I include step functions I need to start a separate instance of state machine from L1 and also need to setup infrastructure for Step functions.

what is the optimal solution - Should I use step function to orchestrate or should I just invoke lambda from another lambda instead of setting up step funtion

1 Answers

The advantage of using AWS Step Functions is it lets you orchestrate multiple AWS services to perform a specific task. So if you have many Lambda functions, you can use AWS Step Functions to create a workflow that performs a specific task.

For example, you can create a workflow that creates a service ticket that includes writing information to a database, and emailing the person to whom the ticket is assigned. For example, each step here is a Lambda function. When used in AWS Step Functions, its a workflow.

enter image description here

Related