canonical: https://jentic.com/apis/amazonaws.com/swf

# AWS Amazon Simple Workflow Service

Jentic publishes the only available OpenAPI specification for Amazon Simple Workflow Service, keeping it validated and agent-ready. Amazon Simple Workflow Service (SWF) coordinates work across distributed application components. It models long-running business processes as workflow executions made up of activity tasks dispatched to workers and decision tasks dispatched to a decider, with full execution history and at-most-once task delivery. The 37 operations cover domain and type registration, polling for tasks, recording activity heartbeats, signalling and cancelling executions, and counting open or closed workflows for capacity planning.

## For AI agents

Coordinate long-running, multi-step workflows by registering domains and workflow types, polling for activity and decision tasks, and signalling running executions.

## Scope

Does not handle event-driven Lambda orchestration, message queueing, or visual state machines - use for long-running, decider-based workflow coordination only.

## Capabilities

- Register and deprecate SWF domains, activity types, and workflow types
- Start, signal, terminate, and request cancellation of workflow executions
- Poll for decision tasks via PollForDecisionTask and respond with decisions
- Poll for activity tasks via PollForActivityTask and report completion, failure, or cancellation
- Record activity heartbeats to keep long-running tasks alive past their timeout
- Inspect execution history with GetWorkflowExecutionHistory for replay and debugging
- Count and list open or closed workflow executions for monitoring and capacity planning

## Use cases

### Long-Running Order Fulfilment Workflows

Model an e-commerce order as an SWF workflow execution that spans payment authorisation, inventory reservation, shipping label generation, and customer notification - each implemented as an activity task picked up by a worker. SWF guarantees at-most-once task delivery and retains execution history for replay, making it well suited to processes that run for hours or days and need a precise audit trail.

Example prompt: Call StartWorkflowExecution in domain 'orders', workflowType OrderFulfilment v1, workflowId order-2026-06-09-001, taskList orders-decider, with input containing the order JSON.

### Human-in-the-Loop Approval Pipelines

Run approval workflows that pause until a human signals a decision. The decider issues a ScheduleActivityTask for the human reviewer's queue; when the reviewer responds, an external system calls SignalWorkflowExecution to deliver the decision. SWF holds execution state for up to a year, so workflows can wait days for review without consuming compute.

Example prompt: Call SignalWorkflowExecution with domain 'approvals', workflowId loan-app-2026-06-09-77, signalName ReviewerDecision, and input '{"decision":"approved","reviewer":"jane.doe"}'.

### Workflow Capacity and Health Monitoring

Operate SWF at scale by polling CountOpenWorkflowExecutions and CountClosedWorkflowExecutions per domain and workflow type. Combine with ListOpenWorkflowExecutions to find stuck runs and GetWorkflowExecutionHistory to drill into the event log when an execution stalls. This is the standard observability pattern for SWF before resorting to custom CloudWatch metrics.

Example prompt: Call CountOpenWorkflowExecutions for domain 'orders' with executionFilter on workflowId prefix 'order-', and return the open count.

### Agent-Orchestrated Workflow Control via Jentic

Let an AI agent kick off, signal, and cancel SWF executions through Jentic without holding AWS keys. The agent submits an intent like 'start a fulfilment workflow for order 1234'; Jentic loads StartWorkflowExecution, validates the input, and executes it. Subsequent agent actions (signal, cancel) flow through the same vaulted credentials, keeping the agent context free of secrets.

Example prompt: Through Jentic, search for 'start an aws swf workflow execution', load StartWorkflowExecution, and execute with domain, workflowId, workflowType, and input.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /#X-Amz-Target=SimpleWorkflowService.StartWorkflowExecution | Start a workflow execution |
| POST | /#X-Amz-Target=SimpleWorkflowService.PollForDecisionTask | Poll for the next decision task |
| POST | /#X-Amz-Target=SimpleWorkflowService.PollForActivityTask | Poll for the next activity task |
| POST | /#X-Amz-Target=SimpleWorkflowService.SignalWorkflowExecution | Signal a running workflow |
| POST | /#X-Amz-Target=SimpleWorkflowService.GetWorkflowExecutionHistory | Read full execution history |
| POST | /#X-Amz-Target=SimpleWorkflowService.RecordActivityTaskHeartbeat | Heartbeat a long-running activity |

## Key resources

- **Domains** — RegisterDomain, DescribeDomain, ListDomains, DeprecateDomain
- **Workflow types** — RegisterWorkflowType, DescribeWorkflowType, ListWorkflowTypes
- **Activity types** — RegisterActivityType, DescribeActivityType, ListActivityTypes
- **Executions** — StartWorkflowExecution, SignalWorkflowExecution, RequestCancelWorkflowExecution, TerminateWorkflowExecution
- **Task polling** — PollForActivityTask, PollForDecisionTask, RecordActivityTaskHeartbeat

## Why Jentic

- **Setup:** Wiring Amazon Simple Workflow Service by hand means computing SigV4 signatures against the us-east-1 swf endpoint, routing calls through the X-Amz-Target action header, and managing long-poll timeouts yourself. Through Jentic you install once, import Simple Workflow Service from the API Directory, store the access keys once, and your agent calls it.
- **Permission scoping:** SWF routes its actions through one endpoint by X-Amz-Target rather than resource ids in the path, so scope the agent to the operations it needs, such as StartWorkflowExecution and GetWorkflowExecutionHistory. You choose the operations it may call, so a cancel or terminate action is not included unless you add it.
- **Credential handling:** Your AWS access keys are stored once, encrypted, by your own Jentic One instance and used to sign each SWF request with SigV4 at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'start an SWF workflow execution' or 'poll for a decision task', and Jentic returns the matching Simple Workflow Service operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **AWS Step Functions** — Step Functions provides managed state-machine orchestration as the modern successor to SWF.
- **Amazon EventBridge** — EventBridge routes events that can trigger SWF workflows or be emitted from them.
- **AWS Lambda** — Lambda functions are commonly used as SWF activity workers and deciders.

## FAQ

### Why is there no official OpenAPI spec for Amazon Simple Workflow Service?

AWS does not publish an OpenAPI specification for Amazon Simple Workflow Service; it ships Smithy models and language-specific SDKs instead. Jentic generates and maintains this OpenAPI spec so that AI agents and developers can call Amazon Simple Workflow Service via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does Amazon Simple Workflow Service use?

SWF uses AWS SigV4 in the Authorization header with X-Amz-Target identifying the action (e.g. SimpleWorkflowService.StartWorkflowExecution). Through Jentic, your AWS access keys are stored encrypted in the vault and Jentic computes the SigV4 signature for each request.

### Can I orchestrate human-in-the-loop steps with SWF?

Yes. Pause an execution by scheduling a long-timeout activity for a human-task queue, or have the decider stop scheduling new tasks until an external SignalWorkflowExecution call delivers the human decision. SWF retains execution state for up to a year.

### What are the rate limits for Amazon SWF?

Default per-account limits include 100 starts per second per workflow type, 200 polls per second per task list, and a 1MB execution input/output size cap. Heartbeats and decisions have separate per-task-list quotas. Most limits are increasable via AWS Support.

### How do I start an SWF workflow execution through Jentic?

Search Jentic with 'start an aws swf workflow execution', load the StartWorkflowExecution schema, and execute with domain, workflowId, workflowType (name + version), taskList, and an input string. Jentic returns the runId of the new execution.

### Should I use SWF or AWS Step Functions for new workflows?

For new projects AWS recommends Step Functions, which offers a managed state machine and visual editor. Use SWF when you have an existing decider/activity-worker codebase, need finer control over task dispatch, or rely on its long execution retention.

### Can I cancel a running workflow execution?

Yes. RequestCancelWorkflowExecution sends a cancellation request that the decider can act on; TerminateWorkflowExecution forces an immediate termination without giving the decider a chance to clean up.

### Can I limit what my agent is allowed to do with the Amazon Simple Workflow Service API?

Yes. Because you run Jentic One yourself, you decide which SWF operations your agent may call, and your own rules are what grant or withhold access. SWF routes every action through a single endpoint by the X-Amz-Target header rather than by resource paths, so you scope the agent to just the operations it needs, such as StartWorkflowExecution, SignalWorkflowExecution, and GetWorkflowExecutionHistory. Destructive actions like RequestCancelWorkflowExecution or TerminateWorkflowExecution stay out of reach unless you explicitly add them.
