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.

FieldTypeRequiredDefaultConstraintsExample
region
AWS region (overrides the connection).
stringNo———
cluster
Cluster name or ARN.
stringYes———
task_definition
Task definition family[:revision].
stringYes———
launch_type
FARGATE or EC2.
stringNo———
subnets
Subnet ids (required for FARGATE).
arrayNo—array of string—
security_groups
Security group ids.
arrayNo—array of string—
assign_public_ip
Assign a public IP.
booleanNo———
count
How many tasks (default 1).
numberNo—≥ 1—

Output

One shape.

result

FieldTypeExample
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.