Step Function and Batch
Last updated
Was this helpful?
Last updated
Was this helpful?
AWS Step Functions is a managed workflow and orchestration platform designed for coordinating AWS components. It provides a scalable and highly available solution for managing complex workflows.
Best suited for human-enabled workflows like order fulfilment or procedural requests.
State Machine Definition: Allows creation of tasks, steps (parallel or sequential), decision points, and timers
Amazon States Language: Uses declarative JSON for configuring and documenting steps
Visual Interface: Provides real-time status monitoring and flow visualization
API Integration: Supports direct interaction with Lambda and other AWS services
Detailed Logging: Captures comprehensive logs for all workflow steps
Step Functions implements the finite state machine concept, where objects can assume different states throughout their lifecycle. For example, in an order processing flow:
New Order → Initial state
Credit Check → Moves to either Canceled or Verified state
Warehouse Processing → Shipping state
Delivery → Delivered state
Final Processing → Either Archived or Returned state
AWS Batch is designed for managing batch processing workloads on EC2 instances with flexible scaling options.
Define Compute Environment
Choose managed or unmanaged configuration
Select instance types (spot or on-demand)
Specify virtual CPU requirements
Create Job Queue
Assign priority levels
Link to compute environment
Define Job
Create using script or JSON
Configure environment variables
Set mount points
Specify container images
Assign IAM roles
Schedule Execution
AWS Batch handles infrastructure scaling based on workload
Best for: Out-of-the-box coordination of AWS components
Ideal Use Case: Automated workflow orchestration within AWS ecosystem
Recommended for: New applications requiring workflow management
Key Strength: Native AWS service integration
Best for: Workflows requiring manual intervention
Ideal Use Case: External processes or specialized logic outside AWS
Example: Loan applications with manual review steps
Note: Legacy service, Step Functions preferred for new applications
Best for: Store and forward patterns
Ideal Use Case: Distributing workload to worker processes
Example: Image resizing pipeline
Key Strength: Message queue management
Best for: Recurring tasks with minimal decision logic
Ideal Use Case: Scheduled maintenance operations
Example: Daily log rotation on firewall appliances
Key Strength: Automated batch processing management
For AWS Certified Solutions Architect Professional examination:
Focus on understanding use cases rather than implementation details
Know when to use each service based on scenario requirements
Understand service relationships and integration possibilities
Remember that Step Functions is preferred over SWF for new applications
Consider manual intervention requirements when choosing between Step Functions and SWF