Skip to main content

AWS ECS | exec

The AWS Elastic Container Service allows connecting to tasks and starting interactive sessions. It's possible to map these commands to Hoop to obtain interactive sessions allocating a pseudo TTY.

note

It's important to configure the ECS tasks before trying this feature, please refer to the AWS documentation first

Connection Configuration

NameTypeDescription
CLUSTER_NAMEenv-varThe name or arn of the ECS Cluster
SERVICE_NAMEenv-varThe name of the service on ECS
AWS_ACCESS_KEY_IDenv-varThe access key credential
AWS_SECRET_ACCESS_KEYenv-varThe secret key credential
AWS_DEFAULT_REGIONenv-varThe AWS region

Connection Command

ecs-exec.sh --interactive --cluster=$CLUSTER_NAME --service-name=$SERVICE_NAME

How to Use

Start an interactive session

hoop connect my-ecs -- --pipe /bin/bash
hoop connect my-ecs -- --pipe 'rails console'
hoop connect my-ecs -- --pipe clojure