Use these actions to manage ECS clusters, capacity providers, container instances, services, task definitions, tasks, account settings, and resource tags directly from a workflow.
Prerequisites
For prerequisites and credentials setup, see Set up AWS credentials.
All ECS actions accept the same auth inputs. Use awsRoleArn (recommended) or the access key pair (awsAccessKeyId and awsSecretAccessKey).
Conseil
We recommend two separate roles: a read-only role for list and describe actions, and a state-changing role for update, run, stop, register, and tag actions. Use the awsRoleArn input per step to switch between them in a single workflow.
Several actions return a failures[] array alongside the main response object (for example, describeTasks, describeContainerInstances, runTask). A non-empty failures[] indicates partial failure — the action itself returns success: true but one or more resources could not be retrieved or acted on. Use a selector to check failures[] in downstream steps when processing multiple resources.
Shared inputs
The following inputs apply to all ECS actions. Use awsRoleArn (recommended) or the access key pair.
| Input | Type | Description |
|---|---|---|
awsRoleArn | String | IAM role ARN to assume for this call. |
awsAccessKeyId | String | AWS access key ID. Pass as a secret. |
awsSecretAccessKey | String | AWS secret access key. Pass as a secret. |
awsSessionToken | String | Temporary session token for STS authentication. Pass as a secret. |
selectors | List | JQ selectors to extract specific fields from the action output. |
IAM permissions
Each action requires a single ECS permission matching its API name. The following table lists the required permission for each action.
Action | Required IAM permission | Additional permissions |
|---|---|---|
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
|
|
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
|
|
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
|
| None |
Conseil
updateCluster and updateClusterSettings both update Container Insights. Use updateClusterSettings when you only need to change settings — it takes only cluster and settings. Use updateCluster when you also need to change execute-command configuration or Service Connect defaults in the same call.
List clusters
Action identifier: aws.ecs.listClusters
Returns a list of ECS cluster ARNs in the account and region. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to query. |
| Integer | Optional. Maximum number of results to return per page. |
| String | Optional. Pagination token from a previous response. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the list_clusters boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-ecs-clustersdescription: List all ECS cluster ARNs in a regionsteps: - name: listClusters type: action action: aws.ecs.listClusters version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 selectors: - name: clusterArns expression: ".response.clusterArns"Describe clusters
Action identifier: aws.ecs.describeClusters
Returns detailed configuration and status information for one or more ECS clusters. Omit clusters to describe the default cluster. Use the include field to request additional details such as settings or statistics.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target clusters. |
| List | Optional. List of cluster names or ARNs. Omit to describe the default cluster. |
| List | Optional. Additional fields to include. Valid values: |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the describe_clusters boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: describe-ecs-clusterdescription: Get cluster settings including Container Insights statussteps: - name: describeClusters type: action action: aws.ecs.describeClusters version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 clusters: - my-cluster include: - SETTINGS selectors: - name: settings expression: ".response.clusters[0].settings"Update a cluster
Action identifier: aws.ecs.updateCluster
Updates a cluster's configuration, including Container Insights settings, execute-command configuration, and Service Connect defaults. Use this action when you need to change multiple cluster properties at once. To update only settings, aws.ecs.updateClusterSettings is simpler.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| String | Required. Cluster name or ARN to update. |
| List | Optional. List of |
| Object | Optional. Cluster configuration including execute-command settings. |
| Object | Optional. Default Service Connect namespace for the cluster. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the update_cluster boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: enable-container-insightsdescription: Enable Container Insights on an ECS clustersteps: - name: updateCluster type: action action: aws.ecs.updateCluster version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster settings: - name: containerInsights value: enabledUpdate cluster settings
Action identifier: aws.ecs.updateClusterSettings
Updates a cluster's settings only (for example, enabling or disabling Container Insights). This is a simpler alternative to aws.ecs.updateCluster when you only need to change settings.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| String | Required. Cluster name or ARN to update. |
| List | Required. List of |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the update_cluster_settings boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: update-cluster-settingsdescription: Enable Container Insights using the settings-only update actionsteps: - name: updateClusterSettings type: action action: aws.ecs.updateClusterSettings version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster settings: - name: containerInsights value: enabledDescribe capacity providers
Action identifier: aws.ecs.describeCapacityProviders
Returns detailed information about capacity providers. Omit capacityProviders to describe all capacity providers in the account. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to query. |
| List | Optional. List of capacity provider names or ARNs. Omit to describe all capacity providers. |
| List | Optional. Additional fields to include. Valid value: |
| Integer | Optional. Maximum number of results per page. |
| String | Optional. Pagination token from a previous response. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the describe_capacity_providers boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: describe-capacity-providersdescription: List all capacity providers in a regionsteps: - name: describeCapacityProviders type: action action: aws.ecs.describeCapacityProviders version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 selectors: - name: capacityProviders expression: ".response.capacityProviders"Update a capacity provider
Action identifier: aws.ecs.updateCapacityProvider
Updates an Auto Scaling group-backed capacity provider's managed scaling configuration, including target capacity and managed termination protection.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the capacity provider. |
| String | Required. Name of the capacity provider to update. |
| Object | Required. Updated configuration including |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the update_capacity_provider boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: update-capacity-providerdescription: Set managed scaling target to 100% for an ASG-backed capacity providersteps: - name: updateCapacityProvider type: action action: aws.ecs.updateCapacityProvider version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 name: my-asg-capacity-provider autoScalingGroupProvider: managedScaling: status: ENABLED targetCapacity: 100Put cluster capacity providers
Action identifier: aws.ecs.putClusterCapacityProviders
Attaches capacity providers to a cluster and sets the default capacity provider strategy. Replaces the full set of capacity providers on the cluster — include all providers you want attached, not just the ones you are adding.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| String | Required. Cluster name or ARN. |
| List | Required. Complete list of capacity provider names to attach to the cluster. |
| List | Required. List of |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the put_cluster_capacity_providers boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: attach-capacity-providersdescription: Attach Fargate and Fargate Spot to a cluster with a default strategysteps: - name: putClusterCapacityProviders type: action action: aws.ecs.putClusterCapacityProviders version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster capacityProviders: - FARGATE - FARGATE_SPOT defaultCapacityProviderStrategy: - capacityProvider: FARGATE weight: 1 base: 0List container instances
Action identifier: aws.ecs.listContainerInstances
Returns a list of container instance ARNs registered to a cluster. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
| String | Optional. Filter expression to narrow results. |
| String | Optional. Filter by instance state. Valid values: |
| Integer | Optional. Maximum number of results per page. |
| String | Optional. Pagination token from a previous response. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the list_container_instances boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-container-instancesdescription: List active container instances in a clustersteps: - name: listContainerInstances type: action action: aws.ecs.listContainerInstances version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster status: ACTIVE selectors: - name: containerInstanceArns expression: ".response.containerInstanceArns"Describe container instances
Action identifier: aws.ecs.describeContainerInstances
Returns detailed information about one or more container instances registered to a cluster.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| List | Required. List of container instance ARNs or IDs to describe. |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
| List | Optional. Additional fields to include. Valid value: |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the describe_container_instances boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: describe-container-instancesdescription: Get status of specific container instancessteps: - name: describeContainerInstances type: action action: aws.ecs.describeContainerInstances version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster containerInstances: - ${{ .steps.listContainerInstances.outputs.containerInstanceArns[0] }}Update container instances state
Action identifier: aws.ecs.updateContainerInstancesState
Changes the state of one or more container instances. Set status to DRAINING to prevent new tasks from being placed on the instances before maintenance, or back to ACTIVE when maintenance is complete.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| List | Required. List of container instance ARNs or IDs to update. |
| String | Required. Target state. Valid values: |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the update_container_instances_state boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: drain-container-instancesdescription: Drain container instances before maintenancesteps: - name: listInstances type: action action: aws.ecs.listContainerInstances version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster selectors: - name: containerInstanceArns expression: ".response.containerInstanceArns" - name: drainInstances type: action action: aws.ecs.updateContainerInstancesState version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster containerInstances: ${{ .steps.listInstances.outputs.containerInstanceArns }} status: DRAININGList services
Action identifier: aws.ecs.listServices
Returns a list of service ARNs running on a cluster. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to query. |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
| String | Optional. Filter by launch type. Valid values: |
| String | Optional. Filter by scheduling strategy. Valid values: |
| Integer | Optional. Maximum number of results per page. |
| String | Optional. Pagination token from a previous response. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the list_services boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-ecs-servicesdescription: List all services on an ECS clustersteps: - name: listServices type: action action: aws.ecs.listServices version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster selectors: - name: serviceArns expression: ".response.serviceArns"Describe services
Action identifier: aws.ecs.describeServices
Returns detailed configuration and status for one or more ECS services, including running count, task definition, and deployment status.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| List | Required. List of service names or ARNs to describe. |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
| List | Optional. Additional fields to include. Valid value: |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the describe_services boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: describe-ecs-servicedescription: Get current task definition of a servicesteps: - name: describeServices type: action action: aws.ecs.describeServices version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster services: - my-service selectors: - name: taskDefinition expression: ".response.services[0].taskDefinition"Update a service
Action identifier: aws.ecs.updateService
Updates an ECS service's desired count, task definition, or deployment configuration. Set forceNewDeployment to true to trigger a redeployment without changing the task definition.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| String | Required. Service name or ARN to update. |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
| Integer | Optional. New desired task count for the service. |
| String | Optional. New task definition (family:revision or ARN) to deploy. |
| Boolean | Optional. Set to |
| Object | Optional. Deployment parameters including |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the update_service boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: force-service-redeploymentdescription: Force a new deployment of an ECS servicesteps: - name: updateService type: action action: aws.ecs.updateService version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster service: my-service forceNewDeployment: trueList services by namespace
Action identifier: aws.ecs.listServicesByNamespace
Returns a list of service ARNs registered under a Cloud Map namespace. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to query. |
| String | Required. Cloud Map namespace name or ARN. |
| Integer | Optional. Maximum number of results per page. |
| String | Optional. Pagination token from a previous response. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the list_services_by_namespace boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-services-by-namespacedescription: List services registered under a Cloud Map namespacesteps: - name: listServicesByNamespace type: action action: aws.ecs.listServicesByNamespace version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 namespace: my-namespace selectors: - name: serviceArns expression: ".response.serviceArns"Describe task sets
Action identifier: aws.ecs.describeTaskSets
Returns detailed information about EXTERNAL-deployment-controller task sets. Only applies to services using the EXTERNAL deployment controller — returns an error for services using ECS or CODE_DEPLOY controllers. The taskSets input is required and must not be empty.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| String | Required. Cluster name or ARN. |
| String | Required. Service name or ARN. Must use the |
| List | Required. List of task set IDs or ARNs to describe. Must not be empty. |
| List | Optional. Additional fields to include. Valid value: |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the describe_task_sets boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: describe-task-setsdescription: Inspect an EXTERNAL-controller task setsteps: - name: describeTaskSets type: action action: aws.ecs.describeTaskSets version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster service: my-external-service taskSets: - arn:aws:ecs:us-east-1:123456789012:task-set/my-cluster/my-service/ecs-svc-abc123Conseil
Deleting a task definition revision is a two-step process: first deregister it with aws.ecs.deregisterTaskDefinition (sets status to INACTIVE), then permanently delete it with aws.ecs.deleteTaskDefinitions. You cannot delete an ACTIVE revision directly.
List task definitions
Action identifier: aws.ecs.listTaskDefinitions
Returns a list of task definition ARNs. Filter by family prefix, status, or sort order. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to query. |
| String | Optional. Filter to task definitions whose family name starts with this prefix. |
| String | Optional. Filter by status. Valid values: |
| String | Optional. Sort order for results. Valid values: |
| Integer | Optional. Maximum number of results per page. |
| String | Optional. Pagination token from a previous response. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the list_task_definitions boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-task-definitionsdescription: List active task definition revisions for a familysteps: - name: listTaskDefinitions type: action action: aws.ecs.listTaskDefinitions version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 familyPrefix: my-task status: ACTIVE sort: DESC selectors: - name: taskDefinitionArns expression: ".response.taskDefinitionArns"Describe a task definition
Action identifier: aws.ecs.describeTaskDefinition
Returns the full specification for a task definition revision.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to query. |
| String | Required. Task definition family and revision ( |
| List | Optional. Additional fields to include. Valid value: |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the describe_task_definition boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: describe-task-definitiondescription: Get the full specification for a task definition revisionsteps: - name: describeTaskDefinition type: action action: aws.ecs.describeTaskDefinition version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 taskDefinition: my-task:5 selectors: - name: containerDefinitions expression: ".response.taskDefinition.containerDefinitions"Register a task definition
Action identifier: aws.ecs.registerTaskDefinition
Registers a new revision of a task definition. Each call to this action creates a new revision number within the same family.
Important
When taskRoleArn or executionRoleArn is set, the calling role also needs iam:PassRole on those role ARNs.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to register the task definition in. |
| String | Required. Task definition family name. |
| List | Required. List of container definition objects. |
| String | Optional. Docker networking mode. Valid values: |
| List | Optional. Launch type compatibility. Valid values: |
| String | Optional. CPU units for the task (required for Fargate). |
| String | Optional. Memory in MiB for the task (required for Fargate). |
| String | Optional. ARN of the task execution IAM role. |
| String | Optional. ARN of the IAM role that containers in this task can assume. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the register_task_definition boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
This example registers a new task definition revision and immediately deploys it to a service. This is the typical CD pattern: register a new image, then update the service to roll it out.
name: deploy-new-task-revisiondescription: Register a new task definition revision and deploy it to a servicesteps: - name: registerTaskDefinition type: action action: aws.ecs.registerTaskDefinition version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 family: my-task networkMode: awsvpc requiresCompatibilities: - FARGATE cpu: "256" memory: "512" containerDefinitions: - name: app image: public.ecr.aws/nginx/nginx:1.25 essential: true selectors: - name: taskDefinitionArn expression: ".response.taskDefinition.taskDefinitionArn" - name: deployToService type: action action: aws.ecs.updateService version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster service: my-service taskDefinition: ${{ .steps.registerTaskDefinition.outputs.taskDefinitionArn }} selectors: - name: serviceArn expression: ".response.service.serviceArn"Deregister a task definition
Action identifier: aws.ecs.deregisterTaskDefinition
Deregisters (soft-deletes) a task definition revision, changing its status from ACTIVE to INACTIVE. Deregistered revisions can still be described but cannot be used to run new tasks. Use aws.ecs.deleteTaskDefinitions to permanently delete deregistered revisions.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the task definition. |
| String | Required. Task definition family and revision ( |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the deregister_task_definition boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: deregister-task-definitiondescription: Deregister an old task definition revisionsteps: - name: deregisterTaskDefinition type: action action: aws.ecs.deregisterTaskDefinition version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 taskDefinition: my-task:3Delete task definitions
Action identifier: aws.ecs.deleteTaskDefinitions
Permanently deletes one or more deregistered task definition revisions. Only revisions with status INACTIVE can be deleted — deregister them first with aws.ecs.deregisterTaskDefinition if needed.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the task definitions. |
| List | Required. List of task definition revisions to delete, each as |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the delete_task_definitions boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: delete-task-definitionsdescription: Permanently delete deregistered task definition revisionssteps: - name: deleteTaskDefinitions type: action action: aws.ecs.deleteTaskDefinitions version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 taskDefinitions: - my-task:3 - my-task:4List task definition families
Action identifier: aws.ecs.listTaskDefinitionFamilies
Returns a list of task definition family names. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to query. |
| String | Optional. Filter to families whose name starts with this prefix. |
| String | Optional. Filter by family status. Valid values: |
| Integer | Optional. Maximum number of results per page. |
| String | Optional. Pagination token from a previous response. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the list_task_definition_families boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-task-definition-familiesdescription: List active task definition families with a name prefixsteps: - name: listTaskDefinitionFamilies type: action action: aws.ecs.listTaskDefinitionFamilies version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 familyPrefix: my-task status: ACTIVE selectors: - name: families expression: ".response.families"Important
runTask and stopTask are asynchronous — they return as soon as ECS accepts the request, before the task has actually started or stopped. Always poll with aws.ecs.describeTasks until lastStatus reaches a terminal state (RUNNING after launch, STOPPED after stop). Do not assume the task is in its final state after a single call.
startTask only works on EC2 container instances — it fails on Fargate-only clusters.
List tasks
Action identifier: aws.ecs.listTasks
Returns a list of task ARNs on a cluster. Filter by service, family, desired status, or launch type. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to query. |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
| String | Optional. Filter to tasks started by this service. |
| String | Optional. Filter to tasks using this task definition family. |
| String | Optional. Filter by desired status. Valid values: |
| String | Optional. Filter by launch type. Valid values: |
| Integer | Optional. Maximum number of results per page. |
| String | Optional. Pagination token from a previous response. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the list_tasks boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-running-tasksdescription: List running tasks on a clustersteps: - name: listTasks type: action action: aws.ecs.listTasks version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster desiredStatus: RUNNING selectors: - name: taskArns expression: ".response.taskArns"Describe tasks
Action identifier: aws.ecs.describeTasks
Returns detailed status and configuration for one or more ECS tasks.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target tasks. |
| List | Required. List of task ARNs or IDs to describe. |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
| List | Optional. Additional fields to include. Valid value: |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the describe_tasks boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: describe-tasksdescription: Get status of specific ECS taskssteps: - name: describeTasks type: action action: aws.ecs.describeTasks version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster tasks: - ${{ .steps.listTasks.outputs.taskArns[0] }} selectors: - name: lastStatus expression: ".response.tasks[0].lastStatus"Run a task
Action identifier: aws.ecs.runTask
Runs a new standalone task on a cluster. Asynchronous — returns as soon as ECS accepts the request. Use aws.ecs.describeTasks to poll until the task reaches a terminal status.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to run the task in. |
| String | Required. Task definition family and revision ( |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
| String | Optional. Launch type. Valid values: |
| Object | Optional. Required for |
| Integer | Optional. Number of task instances to run. Defaults to 1. |
| String | Optional. Tag to identify who started the task. |
| Object | Optional. Container and task overrides such as environment variables or commands. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the run_task boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
This example runs a Fargate task and polls describeTasks until the task reaches a terminal status. runTask is asynchronous — the task may still be in PENDING when the action returns.
name: run-and-monitor-fargate-taskdescription: Run a Fargate task and poll until it reaches RUNNING or STOPPEDsteps: - name: runTask type: action action: aws.ecs.runTask version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster taskDefinition: my-task:5 launchType: FARGATE networkConfiguration: awsvpcConfiguration: subnets: - subnet-abc123 securityGroups: - sg-xyz456 assignPublicIp: ENABLED selectors: - name: taskArn expression: ".response.tasks[0].taskArn" - name: waitForStart type: wait seconds: 10 - name: pollTaskStatus type: action action: aws.ecs.describeTasks version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster tasks: - ${{ .steps.runTask.outputs.taskArn }} selectors: - name: lastStatus expression: ".response.tasks[0].lastStatus" - name: checkTerminal type: switch switch: - condition: ${{ .steps.pollTaskStatus.outputs.lastStatus == "RUNNING" or .steps.pollTaskStatus.outputs.lastStatus == "STOPPED" }} next: logResult next: waitForStart - name: logResult type: action action: newrelic.ingest.sendLogs version: '1' inputs: logs: - message: "Task reached terminal status" attributes: taskArn: ${{ .steps.runTask.outputs.taskArn }} lastStatus: ${{ .steps.pollTaskStatus.outputs.lastStatus }}Start a task
Action identifier: aws.ecs.startTask
Starts a task on specific EC2 container instances. Unlike aws.ecs.runTask, places the task on instances you specify rather than letting ECS choose. Requires EC2 container instances — does not work on Fargate-only clusters.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| String | Required. Task definition family and revision ( |
| List | Required. List of container instance ARNs or IDs to place the task on. |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
| String | Optional. Tag to identify who started the task. |
| Object | Optional. Container and task overrides. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the start_task boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: start-task-on-instancedescription: Start a task on a specific EC2 container instancesteps: - name: startTask type: action action: aws.ecs.startTask version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster taskDefinition: my-task:5 containerInstances: - arn:aws:ecs:us-east-1:123456789012:container-instance/my-cluster/abc123Stop a task
Action identifier: aws.ecs.stopTask
Stops a running ECS task. The task moves to STOPPED status and ECS records the reason. Asynchronous — the task may not be fully stopped immediately.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target task. |
| String | Required. Task ARN or ID to stop. |
| String | Optional. Cluster name or ARN. Defaults to the default cluster. |
| String | Optional. Reason for stopping the task. Stored in the task's |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the stop_task boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: stop-ecs-taskdescription: Stop a running ECS task with a reasonsteps: - name: stopTask type: action action: aws.ecs.stopTask version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster task: ${{ .steps.runTask.outputs.taskArn }} reason: Stopped by workflow automationGet task protection
Action identifier: aws.ecs.getTaskProtection
Retrieves the scale-in protection status of one or more tasks. Omit tasks to get protection status for all tasks in the cluster.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| String | Required. Cluster name or ARN. |
| List | Optional. List of task ARNs or IDs to query. Omit to query all tasks in the cluster. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the get_task_protection boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: get-task-protectiondescription: Check scale-in protection status for a tasksteps: - name: getTaskProtection type: action action: aws.ecs.getTaskProtection version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster tasks: - ${{ .steps.runTask.outputs.taskArn }} selectors: - name: protectedTasks expression: ".response.protectedTasks"Update task protection
Action identifier: aws.ecs.updateTaskProtection
Enables or disables scale-in protection for one or more ECS tasks. Protected tasks are not terminated when the service scales in. Set expiresInMinutes to automatically expire the protection after a set time.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target cluster. |
| String | Required. Cluster name or ARN. |
| List | Required. List of task ARNs or IDs to update. |
| Boolean | Required. Set to |
| String | Optional. Number of minutes until protection expires automatically. Only valid when |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the update_task_protection boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: protect-task-during-operationdescription: Enable scale-in protection on a task for 60 minutessteps: - name: updateTaskProtection type: action action: aws.ecs.updateTaskProtection version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 cluster: my-cluster tasks: - ${{ .steps.runTask.outputs.taskArn }} protectionEnabled: true expiresInMinutes: "60"List account settings
Action identifier: aws.ecs.listAccountSettings
Lists ECS account settings for the calling principal or for a specified principal. Use effectiveSettings: true to return the effective settings (including account defaults) rather than only principal-scoped overrides. The response is paginated — use nextToken from the previous response to retrieve the next page.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to query. |
| String | Optional. Filter by setting name. Valid values: |
| String | Optional. Filter by setting value. |
| String | Optional. ARN of the principal whose settings to list. Requires |
| Boolean | Optional. Set to |
| Integer | Optional. Maximum number of results per page. |
| String | Optional. Pagination token from a previous response. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the list_account_settings boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-ecs-account-settingsdescription: Get the effective Container Insights setting for the calling principalsteps: - name: listAccountSettings type: action action: aws.ecs.listAccountSettings version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 name: containerInsights effectiveSettings: true selectors: - name: settings expression: ".response.settings"Put an account setting
Action identifier: aws.ecs.putAccountSetting
Sets a principal-scoped ECS account setting for the calling principal or a specified principal. This overrides the account default for the principal only.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to apply the setting in. |
| String | Required. Setting name. Valid values: |
| String | Required. Setting value. Valid values: |
| String | Optional. ARN of the principal to apply the setting for. Defaults to the calling principal. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the put_account_setting boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: enable-container-insights-settingdescription: Enable Container Insights for the calling principalsteps: - name: putAccountSetting type: action action: aws.ecs.putAccountSetting version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 name: containerInsights value: enabledDelete an account setting
Action identifier: aws.ecs.deleteAccountSetting
Clears a principal-scoped ECS account setting override, restoring the account default for that principal.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region to apply the change in. |
| String | Required. Setting name to clear. Valid values: |
| String | Optional. ARN of the principal whose override to clear. Defaults to the calling principal. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the delete_account_setting boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: clear-account-settingdescription: Clear a principal-scoped Container Insights overridesteps: - name: deleteAccountSetting type: action action: aws.ecs.deleteAccountSetting version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 name: containerInsightsTag a resource
Action identifier: aws.ecs.tagResource
Adds or updates tags on an ECS resource. Existing tags with the same key are overwritten.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target resource. |
| String | Required. ARN of the ECS resource to tag. |
| List | Required. List of |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the tag_resource boto3 reference. Returns an empty object on success. |
| Boolean |
|
| String | Error message on failure. |
name: tag-ecs-servicedescription: Tag an ECS service for cost attributionsteps: - name: tagResource type: action action: aws.ecs.tagResource version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 resourceArn: arn:aws:ecs:us-east-1:123456789012:service/my-cluster/my-service tags: - key: ManagedBy value: workflow-automation - key: Environment value: productionUntag a resource
Action identifier: aws.ecs.untagResource
Removes one or more tags from an ECS resource.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target resource. |
| String | Required. ARN of the ECS resource to untag. |
| List | Required. List of tag key strings to remove. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the untag_resource boto3 reference. Returns an empty object on success. |
| Boolean |
|
| String | Error message on failure. |
name: untag-ecs-resourcedescription: Remove tags from an ECS servicesteps: - name: untagResource type: action action: aws.ecs.untagResource version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 resourceArn: arn:aws:ecs:us-east-1:123456789012:service/my-cluster/my-service tagKeys: - ManagedByList tags for a resource
Action identifier: aws.ecs.listTagsForResource
Returns all tags attached to an ECS resource.
Input | Type | Description |
|---|---|---|
| String | Required. AWS region of the target resource. |
| String | Required. ARN of the ECS resource to list tags for. |
For auth and selector inputs, see Prerequisites.
Output | Type | Description |
|---|---|---|
| Object | See the list_tags_for_resource boto3 reference. Contains |
| Boolean |
|
| String | Error message on failure. |
name: list-resource-tagsdescription: List all tags on an ECS servicesteps: - name: listTagsForResource type: action action: aws.ecs.listTagsForResource version: '1' inputs: awsRoleArn: ${{ :secrets:awsRoleArn }} region: us-east-1 resourceArn: arn:aws:ecs:us-east-1:123456789012:service/my-cluster/my-service selectors: - name: tags expression: ".response.tags"