#aws-cli #task #container #connection #string #connect #running

app ecs-jumper

Generate awscli connection strings to running ECS tasks

3 releases

0.1.4 Sep 10, 2024
0.1.3 Sep 6, 2024
0.1.2 Sep 6, 2024
0.1.1 Sep 6, 2024

#579 in Network programming

Download history 250/week @ 2024-09-01 117/week @ 2024-09-08 25/week @ 2024-09-15 40/week @ 2024-09-22 7/week @ 2024-09-29 3/week @ 2024-10-06

79 downloads per month

MIT/Apache

14KB
116 lines

ECS session manager helper

Simple program to output the proper awscli command to connect to a running ECS task.

Usage

ecs-jumper -c cluster-name -n container-name -s service-name -r us-west-2

Output:

Container Image: 123123123.dkr.ecr.us-west-2.amazonaws.com/example:7a80faa
Running image Tag: 7a80faa


aws ecs execute-command \
                --region us-west-2 \
                --cluster example-cluster \
                --task arn:aws:ecs:us-west-2:123123123:task/container-name/edafda3154507abc1dfff8e33e220 \
                --container container-name \
                --command "/bin/bash" \
                --interactive

You can run it with --quiet to supress the extra output and pipe the output to the shell, allowing you to connect without copying and pasting the output.

ecs-jumper -c cluster-name -n container-name -s service-name -r us-west-2 --quiet | bash

Dependencies

~19–26MB
~360K SLoC