Run Task
ecs.run_task
ActionAmazon Web Servicesconnection required
Calls the AWS ecs API (SigV4).
Run a container task on an ECS cluster.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Amazon ECS
- Secret shape
- {"access_key_id", "secret_access_key"}
- Config it needs
- region
- Resolved by
- config.connection_id, else node.connection_id
Configuration
8 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
region AWS region (overrides the connection). | string | No | — | — | — |
cluster Cluster name or ARN. | string | Yes | — | — | — |
task_definition Task definition family[:revision]. | string | Yes | — | — | — |
launch_type FARGATE or EC2. | string | No | — | — | — |
subnets Subnet ids (required for FARGATE). | array | No | — | array of string | — |
security_groups Security group ids. | array | No | — | array of string | — |
assign_public_ip Assign a public IP. | boolean | No | — | — | — |
count How many tasks (default 1). | number | No | — | ≥ 1 | — |
Output
One shape.
result
| Field | Type | Example |
|---|---|---|
tasks | array | — |
tasks[].task_arn The task's own ARN. | string | — |
tasks[].last_status PROVISIONING, PENDING, RUNNING, STOPPED, … | string | — |
tasks[].desired_status The status ECS is driving it towards. | string | — |
tasks[].cpu CPU units reserved for the task. | string | — |
tasks[].memory Memory (MiB) reserved for the task. | string | — |
tasks[].stopped_reason Why the task stopped, in prose. | string | — |
tasks[].cluster_arn ARN of the cluster the task is running on. | string | — |
tasks[].task_definition_arn ARN of the task definition revision that actually ran. | string | — |
tasks[].container_instance_arn Container instance hosting the task (EC2 launch type only). | string | — |
tasks[].capacity_provider_name Capacity provider that placed the task, when a strategy chose one. | string | — |
tasks[].stop_code Machine-readable stop reason: TaskFailedToStart, EssentialContainerExited, UserInitiated, … | string | — |
tasks[].launch_type FARGATE or EC2, as actually placed. | string | — |
tasks[].created_at When ECS created the task. | number | — |
count | number | — |
failures | array | — |
{
"count": 0,
"failures": [],
"tasks": [
{
"capacity_provider_name": "",
"cluster_arn": "",
"container_instance_arn": "",
"cpu": "",
"created_at": 0,
"desired_status": "",
"last_status": "",
"launch_type": "",
"memory": "",
"stop_code": "",
"stopped_reason": "",
"task_arn": "",
"task_definition_arn": ""
}
]
}Related Amazon ECS nodes
See Run Task run in a workflow.
In a technical demo we add the Amazon ECS connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.