Skip to main content

AWS ECS Exec

Execute commands inside a running container (Tasks) in a ECS Cluster, this type is useful when there's a necessity to change the state of a running system. It's possible to pass any kind of command to a container through Runops.

Type: ecs-exec

Configuration#

NameRequiredDescription
ECS_CLUSTERyesThe name of the ECS Cluster.
ECS_SERVICE_NAMEyesThe name of the ECS service.
ECS_CONTAINERyesThe name of the running container of the ECS Task.
ECS_AWS_ACCESS_KEY_IDyesECS AWS Access Key ID.
ECS_AWS_SECRET_ACCESS_KEYyesECS AWS Secret Access Key.
ECS_AWS_REGIONyesECS AWS Region.
info

The ECS task id is obtained dynamically listing it by its service name

In order for this to work the ECS need to be configured properly, check this additional information:

Examples#

Run env command to dump the environment variables of a container instance.

runops tasks create --target ecs-exec-type -s 'env'

Limitations#

  • Executing an invalid ECS task will not result in an Runops Task error.