1 Answers
It would most certainly make sense to isolate the entire EC2 if that scenario occurred. You should probably also take each container using the same image out of service immediately, even if they run on different EC2 instances. Also isolate all EC2 instances in the same setup. At least until you figure out how the container was breached. It is very likely that an attacker that somehow makes it in to your containers came there via your EC2 instance.
I would also suggest using Fargate (for ECS only, until the EKS support finally arrives). With Fargate it is not possible to access the underlying EC2, since it is abstracted away from you. Thus there is no way to get in to the containers either (unless the attacker manages to add code to your project that eventually ends up in a Docker image that you run in ECS)