My team inherited an AWS ECS Cluster with multiple linked containers running on it, but without the source code (yeah, I know...). We need to connect to one of the running containers and execute a few commands in it. Here's what we tried:
- connecting to the container instance, but there's no associated instance with the cluster
- using ECS EXEC with AWS Copilot but it's not clear how we could connect to the cluster without having access to the source code used for deployment
How else could we connect to a container running on AWS ECS?
UPDATE:
I tried accessing the container with AWS CLI following an example here, only to find out that execute command was not enabled in the task:
An error occurred (InvalidParameterException) when calling the ExecuteCommand operation: The execute command failed because execute command was not enabled when the task was run or the execute command agent isn’t running. Wait and try again or run a new task with execute command enabled and try again.
Is now a good time to give up?