Step Functions Flashcards
What is AWS Step Functions
- Build serverless visual workflow to orchestrate your Lambda functions
- Represent flow as a JSON state machine
- Features: sequence, parallel, conditions, timeouts, error handling…
- Maximum execution time of 1 year
- Possibility to implement human approval feature
- If you chain Lambda functions using Step Functions, be mindful of the added latency to pass the calls
What can Step Function integrate with
Optimized Integrations
* Can invoke a Lambda function
* Run an AWS Batch job
* Run an ECS task and wait for it to complete
* Insert an item from DynamoDB
* Publish message to SNS, SQS
* Launch an EMR, Glue, or SageMaker jobs
* Launch another Step Function workflow…
AWS SDK Integrations
* Access 200+ AWS services from your State
Machine
* Works like standard AWS SDK API call
How can you invoke a Step Function workflow
- AWS Management Console
- AWS SDK (StartExecution API call)
- AWS CLI (start-execution)
- AWS Lambda (StartExecution API
call) - API Gateway
- EventBridge
- CodePipeline
- Step Function
What are some tasks in which Step Functions can do
Lambda Tasks:
* Invoke a Lambda function
Activity Tasks:
* Activity worker (HTTP), EC2 Instances, mobile device, on premise DC
* They poll the Step functions service
Service Tasks:
* Connect to a supported AWS service
* Lambda function, ECS Task, Fargate, DynamoDB, Batch job, SNS topic, SQS queue
Wait Task:
* To wait for a duration or until a timestamp
Does Step Functions integrate with AWS Mechanical Turk?
No, Step Functions does not integrate natively with AWS Mechanical Turk. Instead use SWF
Within an Express Workflow, there is a Synchnonous vs Asynchronous Express Workflows, what are the difference between both
Synchronous Express Workflows
* Wait until the Workflow completes, then return the result
* Examples: orchestrate microservices, handle errors, retries, parallel tasks
Asynchronous Express Workflows
* Doesn’t for the Workflow to complete
* Examples: Workflows that don’t require immediate response, messaging
How do we conduct error handling within Step Functions
You can enable error handling, retries, and add alerting to Step Function State Machine
* Example: set up EventBridge to alert via email if a State Machine execution fails