Table of Contents
hide
⚠️ AWS Recommends Step Functions for New Applications
AWS SWF remains available and supported, but AWS officially recommends AWS Step Functions for most new workflow and orchestration use cases.
SWF is still used in legacy and specialized systems requiring the SWF programming model (deciders/workers, long-lived workflows, and explicit control over scheduling and retries).
Modern Alternatives:
- AWS Step Functions – Serverless visual workflow orchestration with 200+ native integrations
- AWS Lambda Durable Functions (Dec 2025) – Multi-step workflows directly within Lambda code
AWS SWF – Simple Workflow
- AWS SWF makes it easy to build applications that coordinate work across distributed components
- SWF makes it easier to develop asynchronous and distributed applications by providing a programming model and infrastructure for coordinating distributed components, tracking and maintaining their execution state in a reliable way
- SWF does the following
- stores metadata about a workflow and its component parts.
- stores task for workers and queues them until a Worker needs them.
- assigns task to workers, which can run either on cloud or on-premises
- routes information between executions of a workflow and the associated Workers.
- tracks the progress of workers on Tasks, with configurable timeouts.
- maintains workflow state in a durable fashion
- SWF helps coordinating tasks across the application which involves managing intertask dependencies, scheduling, and concurrency in accordance with the logical flow of the application.
- SWF gives full control over implementing tasks and coordinating them without worrying about underlying complexities such as tracking their progress and maintaining their state.
- SWF tracks and maintains the workflow state in a durable fashion, so that the application is resilient to failures in individual components, which can be implemented, deployed, scaled, and modified independently
- SWF offers capabilities to support a variety of application requirements and is suitable for a range of use cases that require coordination of tasks, including media processing, web application back-ends, business process workflows, and analytics pipelines.
Simple Workflow Concepts

- Workflow
- Fundamental concept in SWF is the Workflow, which is the automation of a business process
- A workflow is a set of activities that carry out some objective, together with logic that coordinates the activities.
- Workflow Execution
- A workflow execution is a running instance of a workflow
- Workflow History
- SWF maintains the state and progress of each workflow execution in its Workflow History, which saves the application from having to store the state in a durable way.
- It enables applications to be stateless as all information about a workflow execution is stored in its workflow history.
- For each workflow execution, the history provides a record of which activities were scheduled, their current status, and their results. The workflow execution uses this information to determine next steps.
- History provides a detailed audit trail that can be used to monitor running workflow executions and verify completed workflow executions.
- Operations that do not change the state of the workflow for e.g. polling execution do not typically appear in the workflow history
- Markers can be used to record information in the workflow history of a workflow execution that is specific to the use case
- Domain
- Each workflow runs in an AWS resource called a Domain, which controls the workflow’s scope
- An AWS account can have multiple domains, with each containing multiple workflows
- Workflows in different domains cannot interact with each other
- Activities
- Designing an SWF workflow, Activities need to be precisely defined and then registered with SWF as an activity type with information such as name, version and timeout
- Activity Task & Activity Worker
- An Activity Worker is a program that receives activity tasks, performs them, and provides results back. An activity worker can be a program or even a person who performs the task using an activity worker software
- Activity tasks—and the activity workers that perform them can
- run synchronously or asynchronously, can be distributed across multiple computers, potentially in different geographic regions, or run on the same computer,
- be written in different programming languages and run on different operating systems
- be created that are long-running, or that may fail, time out require restarts or that may complete with varying throughput & latency
- Decider
- A Decider implements a Workflow’s coordination logic.
- Decider schedules activity tasks, provides input data to the activity workers, processes events that arrive while the workflow is in progress, and ends (or closes) the workflow when the objective has been completed.
- Decider directs the workflow by receiving decision tasks from SWF and responding back to SWF with decisions. A decision represents an action or set of actions which are the next steps in the workflow which can either be to schedule an activity task, set timers to delay the execution of an activity task, to request cancellation of activity tasks already in progress, and to complete or close the workflow.
- Workers and Deciders are both stateless, and can respond to increased traffic by simply adding additional Workers and Deciders as needed
- Role of SWF service is to function as a reliable central hub through which data is exchanged between the decider, the activity workers, and other relevant entities such as the person administering the workflow.
- Mechanism by which both the activity workers and the decider receive their tasks (activity tasks and decision tasks resp.) is by polling the SWF
- SWF allows “long polling”, requests will be held open for up to 60 seconds if necessary, to reduce network traffic and unnecessary processing
- SWF informs the decider of the state of the workflow by including with each decision task, a copy of the current workflow execution history. The workflow execution history is composed of events, where an event represents a significant change in the state of the workflow execution for e.g events would be the completion of a task, notification that a task has timed out, or the expiration of a timer that was set earlier in the workflow execution. The history is a complete, consistent, and authoritative record of the workflow’s progress
Workflow Implementation & Execution
- Implement Activity workers with the processing steps in the Workflow.
- Implement Decider with the coordination logic of the Workflow.
- Register the Activities and workflow with SWF.
- Start the Activity workers and Decider. Once started, the decider and activity workers should start polling Amazon SWF for tasks.
- Start one or more executions of the Workflow. Each execution runs independently and can be provided with its own set of input data.
- When an execution is started, SWF schedules the initial decision task. In response, the decider begins generating decisions which initiate activity tasks. Execution continues until your decider makes a decision to close the execution.
- View and Track workflow executions
SWF vs. Step Functions
| Feature | AWS SWF | AWS Step Functions |
|---|---|---|
| Orchestration Model | Decider + Activity Workers (code-driven) | State machines defined in JSON/YAML (Amazon States Language) |
| Infrastructure | Must manage worker/decider infrastructure | Fully serverless |
| Max Execution Duration | Up to 1 year | Standard: up to 1 year; Express: up to 5 minutes |
| Service Integrations | None (custom code only) | 200+ native AWS service integrations + HTTPS endpoints |
| Visual Workflow | No | Yes – visual designer and execution visualization |
| Human Tasks | Built-in support via manual activity workers | Supported via callback patterns and task tokens |
| Error Handling | Custom logic in decider | Built-in Retry and Catch per state + Redrive from failure |
| External Signals | Signal events | Callback patterns, EventBridge integration |
| AI/ML Integration | None native | Native Bedrock, SageMaker, AgentCore integration |
| Pricing | Per workflow execution | Per state transition (Standard) or per execution (Express) |
| Use Case | Legacy/specialized workflows needing full control | Recommended for all new workflow applications |
AWS Step Functions – Modern Workflow Orchestration
- AWS Step Functions is a fully managed, serverless workflow service that coordinates multiple AWS services using visual state machines.
- Step Functions uses Amazon States Language (ASL) – a JSON-based language for defining state machines with states like Task, Choice, Parallel, Map, Wait, Pass, Succeed, and Fail.
- Offers two workflow types:
- Standard Workflows – long-running (up to 1 year), exactly-once execution, durable and auditable
- Express Workflows – high-volume, short-duration (up to 5 minutes), at-least-once execution
- Provides 200+ native service integrations including Lambda, DynamoDB, ECS, Bedrock, SQS, SNS, and third-party HTTPS APIs
- Built-in error handling with Retry (automatic retry with exponential backoff) and Catch (fallback states)
Key Step Functions Features (2024-2025)
- Variables and JSONata (Nov 2024) – Assign data in one state and reference it in any subsequent step; JSONata provides powerful query and transformation capabilities replacing complex JSONPath expressions
- Redrive (2023-2024) – Restart failed Standard Workflow executions from the point of failure rather than restarting the entire workflow; available for failed executions within 14 days
- HTTPS Endpoints / HTTP Task – Call third-party APIs directly from workflows without Lambda; supports EventBridge connections for authentication
- Private API Integration (Dec 2024) – Integrate with private APIs using AWS PrivateLink and VPC Lattice for secure cross-network communication
- Amazon Bedrock Integration – Native integration for invoking foundation models, creating fine-tuning jobs, and orchestrating AI/ML pipelines
- Distributed Map – Process large-scale datasets in parallel with support for S3 data sources, Athena manifests, and Parquet files
- AgentCore Integration (2026) – Add AI agent reasoning steps directly in workflows through Amazon Bedrock AgentCore
AWS Lambda Durable Functions (Dec 2025)
- Lambda Durable Functions is a newer alternative for building multi-step, long-running workflows directly within Lambda code
- Extends the Lambda programming model with new primitives:
- Steps – checkpoint progress automatically; recover from failures without losing completed work
- Waits – suspend execution (up to 1 year) for human approvals, external callbacks, or long-running tasks without incurring compute charges
- Key benefits:
- Write workflow logic as regular code in familiar programming languages
- No need to learn a separate DSL (like Amazon States Language)
- Automatic checkpointing and failure recovery
- Ideal for developers who prefer code-first approach over visual state machines
- Best suited for AI agent workflows, human-in-the-loop processes, and multi-step applications
When to Use SWF vs. Step Functions vs. Lambda Durable Functions
- Use AWS SWF when:
- You have existing SWF workflows and migration isn’t justified
- You need explicit control over scheduling, retries, and task routing
- Your workflow requires the specific decider/worker programming model
- Use AWS Step Functions when:
- Building new workflow applications (AWS recommended)
- You need visual workflow design and monitoring
- You require native AWS service integrations
- You need built-in error handling, parallel execution, and branching logic
- Orchestrating AI/ML pipelines with Bedrock
- Use Lambda Durable Functions when:
- You prefer writing workflow logic as code rather than declarative state machines
- Building AI agent workflows with complex decision logic
- You want automatic checkpointing without managing external state
- Your team is familiar with Lambda but not ASL
AWS Certification Exam Practice Questions
- Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
- AWS services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
- AWS exam questions are not updated to keep up the pace with AWS updates, so even if the underlying feature has changed the question might not be updated
- Open to further feedback, discussion and correction.
- What does Amazon SWF stand for?
- Simple Web Flow
- Simple Work Flow
- Simple Wireless Forms
- Simple Web Form
- Regarding Amazon SWF, the coordination logic in a workflow is contained in a software program called a ____.
- Handler
- Decider
- Coordinator
- Worker
- For which of the following use cases are Simple Workflow Service (SWF) and Amazon EC2 an appropriate solution? Choose 2 answers
- Using as an endpoint to collect thousands of data points per hour from a distributed fleet of sensors
- Managing a multi-step and multi-decision checkout process of an e-commerce website
- Orchestrating the execution of distributed and auditable business processes
- Using as an SNS (Simple Notification Service) endpoint to trigger execution of video transcoding jobs
- Using as a distributed session store for your web application
- Amazon SWF is designed to help users…
- … Design graphical user interface interactions
- … Manage user identification and authorization
- … Store Web content
- … Coordinate synchronous and asynchronous tasks which are distributed and fault tolerant.
- What does a “Domain” refer to in Amazon SWF?
- A security group in which only tasks inside can communicate with each other
- A special type of worker
- A collection of related Workflows
- The DNS record for the Amazon SWF service
- Your company produces customer commissioned one-of-a-kind skiing helmets combining nigh fashion with custom technical enhancements Customers can show oft their Individuality on the ski slopes and have access to head-up-displays. GPS rear-view cams and any other technical innovation they wish to embed in the helmet. The current manufacturing process is data rich and complex including assessments to ensure that the custom electronics and materials used to assemble the helmets are to the highest standards Assessments are a mixture of human and automated assessments you need to add a new set of assessment to model the failure modes of the custom electronics using GPUs with CUD across a cluster of servers with low latency networking. What architecture would allow you to automate the existing process using a hybrid approach and ensure that the architecture can support the evolution of processes over time? [PROFESSIONAL]
- Use AWS Data Pipeline to manage movement of data & meta-data and assessments. Use an auto-scaling group of G2 instances in a placement group. (Involves mixture of human assessments)
- Use Amazon Simple Workflow (SWF) to manage assessments, movement of data & meta-data. Use an autoscaling group of G2 instances in a placement group. (Human and automated assessments with GPU and low latency networking)
- Use Amazon Simple Workflow (SWF) to manage assessments movement of data & meta-data. Use an autoscaling group of C3 instances with SR-IOV (Single Root I/O Virtualization). (C3 and SR-IOV won’t provide GPU as well as Enhanced networking needs to be enabled)
- Use AWS data Pipeline to manage movement of data & meta-data and assessments use auto-scaling group of C3 with SR-IOV (Single Root I/O virtualization). (Involves mixture of human assessments)
- Your startup wants to implement an order fulfillment process for selling a personalized gadget that needs an average of 3-4 days to produce with some orders taking up to 6 months you expect 10 orders per day on your first day. 1000 orders per day after 6 months and 10,000 orders after 12 months. Orders coming in are checked for consistency men dispatched to your manufacturing plant for production quality control packaging shipment and payment processing. If the product does not meet the quality standards at any stage of the process employees may force the process to repeat a step Customers are notified via email about order status and any critical issues with their orders such as payment failure. Your case architecture includes AWS Elastic Beanstalk for your website with an RDS MySQL instance for customer data and orders. How can you implement the order fulfillment process while making sure that the emails are delivered reliably? [PROFESSIONAL]
- Add a business process management application to your Elastic Beanstalk app servers and re-use the ROS database for tracking order status use one of the Elastic Beanstalk instances to send emails to customers. (Would use a SWF instead of BPM)
- Use SWF with an Auto Scaling group of activity workers and a decider instance in another Auto Scaling group with min/max=1. Use the decider instance to send emails to customers. (Decider sending emails might not be reliable)
- Use SWF with an Auto Scaling group of activity workers and a decider instance in another Auto Scaling group with min/max=1. Use SES to send emails to customers.
- Use an SQS queue to manage all process tasks. Use an Auto Scaling group of EC2 Instances that poll the tasks and execute them. Use SES to send emails to customers. (Does not provide an ability to repeat a step)
- Select appropriate use cases for SWF with Amazon EC2? (Choose 2)
- Video encoding using Amazon S3 and Amazon EC2. In this use case, large videos are uploaded to Amazon S3 in chunks. Application is built as a workflow where each video file is handled as one workflow execution.
- Processing large product catalogs using Amazon Mechanical Turk. While validating data in large catalogs, the products in the catalog are processed in batches. Different batches can be processed concurrently.
- Order processing system with Amazon EC2, SQS, and SimpleDB. Use SWF notifications to orchestrate an order processing system running on EC2, where notifications sent over HTTP can trigger real-time processing in related components such as an inventory system or a shipping service.
- Using as an SQS (Simple Queue Service) endpoint to trigger execution of video transcoding jobs.
- When you register an activity in Amazon SWF, you provide the following information, except:
- a name
- timeout values
- a domain
- version
- Regarding Amazon SWF, at times you might want to record information in the workflow history of a workflow execution that is specific to your use case. ____ enable you to record information in the workflow execution history that you can use for any custom or scenario-specific purpose.
- Markers
- Tags
- Hash keys
- Events
- Which of the following statements about SWF are true? Choose 3 answers.
- SWF tasks are assigned once and never duplicated
- SWF requires an S3 bucket for workflow storage
- SWF workflow executions can last up to a year
- SWF triggers SNS notifications on task assignment
- SWF uses deciders and workers to complete tasks
- SWF requires at least 1 EC2 instance per domain
- A company needs to orchestrate a multi-step order processing workflow. The workflow involves Lambda functions, requires visual monitoring, and must handle errors with automatic retries. Which AWS service should they use?
- Amazon SWF with deciders and activity workers
- Amazon SQS with dead-letter queues
- AWS Step Functions with Standard Workflows
- Amazon EventBridge with rules and targets
- A development team is building an AI-powered document processing pipeline that invokes Amazon Bedrock models, stores results in DynamoDB, and notifies users via SNS. The workflow needs to handle failures gracefully and restart from the point of failure. Which combination provides the MOST operationally efficient solution?
- AWS SWF with custom decider logic for error handling
- Lambda functions orchestrated with SQS queues and DLQ
- AWS Step Functions with native service integrations, Retry/Catch blocks, and Redrive
- Amazon MWAA (Managed Airflow) with custom operators
- A developer needs to build a workflow that coordinates multiple steps, includes human approval, and can pause execution for days while waiting. The developer wants to write the workflow logic as regular code without learning a separate workflow language. Which service is MOST appropriate?
- AWS SWF with activity workers
- AWS Step Functions with callback patterns
- AWS Lambda Durable Functions with waits
- Amazon SQS with visibility timeout
HI,
Were those questions covered in the exam ?
I got #2 in my Solution Architect – Associate exam
Pls suggest answers…
Q. Select appropriate use cases for SWF with Amazon EC2? (Choose 2)
1. Video encoding using Amazon S3 and Amazon EC2. In this use case, large videos are uploaded to Amazon S3 in chunks. Application is built as a workflow where each video file is handled as one workflow execution.
2. Processing large product catalogs using Amazon Mechanical Turk. While validating data in large catalogs, the products in the catalog are processed in batches. Different batches can be processed concurrently.
3. Order processing system with Amazon EC2, SQS, and SimpleDB. Use SWF notifications to orchestrate an order processing system running on EC2, where notifications sent over HTTP can trigger real-time processing in related components such as an inventory system or a shipping service.
4. Using as an SQS (Simple Queue Service) endpoint to trigger executon of video transcoding jobs.
Would go with #1 and #2. Refer to “What are some use cases that can be solved with Amazon SWF?” @ https://aws.amazon.com/swf/faqs/
Hi Jay
Instead of highlighting the answers in the questions,can you mark the answers alone (by mentioning (1.a,2.b)at the end of this page so that we can try answering the questions without having answers highlighted in the questions.
This is just my suggestion.
Hi Sai, pretty much agreed and have got the same feedback for multiple users. I am looking into a better way to put these questions. Will update soon
Hi, I agree, this would be great if it were possible.
Other than that, excellent site. Many thanks for putting it all together.
thanks, trying for an option lets see if it works …
Q. Select appropriate use cases for SWF with Amazon EC2? (Choose 2)
Agree that answers are #1 and #2. But why not #3? Order processing system /Shipping system.? In Udemy Ryans CSAA I found this as an example given for SWF. ( An item being ordered and it goes thru credit card payment + item being shipped + intem being delivered. All handled by SWF.)
Q9. When you register an activity in Amazon SWF, you provide the following information, except:
a name
timeout values
a domain
version
Domain selection is mandatory right ?
thats right Domain is mandatory. However, the specified domain must have already been registered using the RegisterDomain action and you only provide values for name, version and timeout values.