Why Sonic Was Created
After I exhaust debugging an ECS service with CloudWatch Logs I usually take it to the next step: ssh into the instance. I jump into an instance with a running task or docker container and poke around to figure out the root issue.
In order to find the instance with the service’s docker container I click around on the ECS console website until I find the container instance’s DNS name and then paste it to the terminal. While this process is not complicated, it is tedious. For example, the typical process is:
- Click on the cluster
- Click on the service
- Click on the tasks tab
- Click on the one of the tasks
- Click on the container instance
- Highlight and copy the DNS name
- Paste the DNS name into the terminal to build up the ssh ec2-user@[dnsname] command
- Ssh into the machine
- Find the docker container with “docker ps”
- Run docker exec -ti [container_id] bash
- Finally, debug the actual problem
By the time I get into the container, I need to remind my brain on what the original issue was. This tool automates that process so you do not waste your precious mental energy clicking on links and use it to focus on better things like fixing the actual issue.
Sonic was created to eliminate mundane infrastructure debugging tasks we normally have to do.
Pro tip: Use the <- and -> arrow keys to move back and forward.