Using the Amazon CLI with Amazon Simple Workflow Service - Amazon Simple Workflow Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Using the Amazon CLI with Amazon Simple Workflow Service

Many of the features of Amazon Simple Workflow Service can be accessed from the Amazon CLI. The Amazon CLI provides an alternative to using Amazon SWF with the Amazon Web Services Management Console or in some cases, to programming with the Amazon SWF API and the Amazon Flow Framework.

For example, you can use the Amazon CLI to register a new workflow type:

aws swf register-workflow-type --domain MyDomain --name "MySimpleWorkflow" --workflow-version "v1"

You can also list your registered workflow types:

aws swf list-workflow-types --domain MyDomain --registration-status REGISTERED

The following shows an example of the default output in JSON:

{ "typeInfos": [ { "status": "REGISTERED", "creationDate": 1377471607.752, "workflowType": { "version": "v1", "name": "MySimpleWorkflow" } }, { "status": "REGISTERED", "creationDate": 1371454149.598, "description": "MyDomain subscribe workflow", "workflowType": { "version": "v3", "name": "subscribe" } } ] }

The Amazon SWF commands in Amazon CLI provide the ability to start and manage workflow executions, poll for activity tasks, record task heartbeats, and more! For a complete list of Amazon SWF commands, with descriptions of the available arguments and examples showing their use, see Amazon SWF commands in the Amazon CLI Command Reference.

The Amazon CLI commands follow the Amazon SWF API closely, so you can use the Amazon CLI to learn about the underlying Amazon SWF API. You can also use your existing API knowledge to prototype code or perform Amazon SWF actions on the command line.

To learn more about the Amazon CLI, see the Amazon Command Line Interface User Guide.