Skip to content

Instantly share code, notes, and snippets.

View MichMich's full-sized avatar

Michael Teeuw MichMich

  • Xonay Media
  • Baarn ~ The Netherlands
View GitHub Profile
@MichMich
MichMich / ecs-connect.sh
Last active May 14, 2025 16:26
This script allows you to interactively connect to a running ECS task (in AWS Elastic Container Service) using aws ecs execute-command. It lists running tasks in a specified ECS cluster, shows their details (including uptime), and lets you select one to connect to via a shell.
#!/bin/bash
# ANSI Colors (Fix: Use \033 instead of \e)
RED="\033[31m"
GREEN="\033[32m"
YELLOW="\033[33m"
BLUE="\033[34m"
CYAN="\033[36m"
WHITE="\033[97m"
RESET="\033[0m"