AWS Command Line Interface
User Guide

Working with Amazon SWF Domains Using the AWS CLI

You can use the AWS Command Line Interface (AWS CLI) to manage your Amazon Simple Workflow Service (Amazon SWF) domains.

List Your Domains

To list the Amazon SWF domains that you have registered for your AWS account, you can use swf list-domains. You must include --registration-status and specify either REGISTERED or DEPRECATED.

Here's a minimal example.

$ aws swf list-domains --registration-status REGISTERED { "domainInfos": [ { "status": "REGISTERED", "name": "ExampleDomain" }, { "status": "REGISTERED", "name": "mytest" } ] }


For an example of using DEPRECATED, see Deprecating a Domain.

Get Information about a Domain

To get detailed information about a particular domain, use swf describe-domain. There is one required parameter, --name, which takes the name of the domain you want information about. For example:

$ aws swf describe-domain --name ExampleDomain { "domainInfo": { "status": "REGISTERED", "name": "ExampleDomain" }, "configuration": { "workflowExecutionRetentionPeriodInDays": "1" } }

Register a Domain

To register new domains, use swf register-domain.

There are two required parameters, --name, which takes the domain name to register, and --workflow-execution-retention-period-in-days, which takes an integer to specify the number of days to retain workflow execution data on this domain, up to a maximum period of 90 days (for more information, see the Amazon SWF FAQ).

If you specify zero (0) for this value, the retention period is automatically set at the maximum duration. Otherwise, workflow execution data isn't retained after the specified number of days have passed. The following example shows how to register a new domain.

$ aws swf register-domain --name MyNeatNewDomain --workflow-execution-retention-period-in-days 0

The command doesn't return any output, but you can use swf list-domains or swf describe-domain to see the new domain. For example:

$ aws swf describe-domain --name MyNeatNewDomain { "domainInfo": { "status": "REGISTERED", "name": "MyNeatNewDomain" }, "configuration": { "workflowExecutionRetentionPeriodInDays": "0" } }

Deprecating a Domain

To deprecate a domain (you can still see it, but cannot create new workflow executions or register types on it), use swf deprecate-domain. It has a sole required parameter, --name, which takes the name of the domain to deprecate.

$ aws swf deprecate-domain --name MyNeatNewDomain

As with register-domain, no output is returned. If you use list-domains to view the registered domains, however, you will see that the domain no longer appears among them. You can also use --registration-status DEPRECATED.

$ aws swf list-domains --registration-status DEPRECATED { "domainInfos": [ { "status": "DEPRECATED", "name": "MyNeatNewDomain" } ] }

See Also