Step Function Orchestration Fundamentals
Explore how to orchestrate complex, long-running tasks in serverless applications using AWS Step Functions and .NET. Learn to build workflows that handle order placement, stock checking, parallel processing, and error notifications by integrating AWS Lambda functions with SNS and other AWS resources. Understand step types, error handling, retry policies, and the structure of ASL definitions to efficiently manage distributed tasks and ensure smooth application flow.
We'll cover the following...
In this lesson, we’ll learn how the distributed multistep flow in the following playground can be orchestrated by using an actual Step Function.
{
"Information": [
"This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.",
"To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.",
"dotnet lambda help",
"All the command line options for the Lambda command can be specified in this file."
],
"profile": "",
"region": "",
"configuration": "Release",
"function-architecture": "x86_64",
"function-runtime": "dotnet6",
"function-memory-size": 256,
"function-timeout": 30,
"function-handler": "OrderDispatcher::OrderDispatcher.Function::FunctionHandler"
}This project represents an order flow from an e-commerce website specializing in toys. We’ve designed the tasks in a way that demonstrates all the key orchestration capabilities of a Step Function.
Step Function orchestration fundamentals
Let’s assume we deployed all the AWS Lambda functions from the playground to AWS. The following diagram demonstrates how we can add each of them to the flow in a Step Function.
Here’s how we added each of our AWS Lambda functions to the flow:
The step labeled “Place order” is represented by the
OrderPlacerfunction.If it throws the
InvalidProductException, the process moves to the “Notify invalid product” step. An SNS instance represents this step. This will happen if the specified product code is different from the following:teddymountainbikefootballskateboarddolltoycarset
If the order has been placed successfully, the process moves to the “Check stock” step. ...