Heavily inspired by incredibly useful gossm, this tool makes use of the new ECS ExecuteCommand API to connect to running ECS tasks. It provides an interactive prompt to select your cluster, task and container (if only one container in the task it will default to this), and opens a connection to it.
That's it! Nothing fancy.
⚠️The ExecuteCommand API is quite new at time of creation and existing Services and Tasks may need to be updated/created with the
--enable-execute-commandflag via the CLI. Terraform support for this option is now available)
brew tap tedsmitt/ecsgo brew install ecsgo
wget https://github.com/tedsmitt/ecsgo/releases/download/0.2.0/ecsgo_Linux_x86_64.tar.gz tar xzf ecsgo_*.tar.gz
ecsgo binary into your
||Specify the profile to load the credentials||
||Specify the command to be run on the container, defaults to||
||Specify the AWS region to run in||N/A|
The tool also supports AWS Config/Environment Variables for configuration. If you aren't familiar with working on AWS via the CLI, you can read more about how to configure your environment here.
See it in action below
Why would I use this over something like AWS Copilot?
At this moment in time copilot only supports connecting to resources that are created and/or managed by the copilot CLI. This tool allows you to leverage ECS Exec easily with your existing resources, and plugs the gap until you are able to do the same with Copilot.