# AWS Step Functions - Build serverless visual workflow to orchestrate Lambdas - Represent flow as JSON state machine - Features: sequence, parallel, conditions, timeouts, error handling - Maximum execution time of 1 year - Possible to implement human approval features - Be mindful that there will be latencies in the calls between functions - When you think about having to chain things together then think Step Functions ## Integrations - Optimized Integrations: - Invoke Lambda - Run [[AWS Batch Job]] - Run ECS task and wait for it to complete - Insert an item to DynamoDB - Publish to SNS/SQS - Launch EMR, Glue, SageMaker - Other Step Functions - AWS SDK Integrations ## Triggers - Can invoke using: - Console - AWS SDK - CLI - Lambda - API Gateway - EventBridge - CodePipeline - Step Functions ## Tasks - Lambda Tasks - simple invoke - Activity Tasks - Activity worker (HTTP) - Polls Step Functions service looking for work to do - Service Tasks - Connect to a supported AWS service - Wait Task - Wait for a duration or timestamp - Step Functions does not integrate natively with [[AWS Mechanical Turk]]. [[Amazon Simple Workflow Service]] does integrate natively. ## Solution Architecture - When you can use AWS services directly (instead of via Lambda) then you can get faster execution and lower expense. So a step might insert to SQS rather than invoke a Lambda to insert to SQS. ![[Pasted image 20220330102203.png]] --- Link to original note: [[Ultimate AWS Certified Solutions Architect Professional 2022]]