Select Language:
If you’re trying to shut down an EC2 instance that’s part of an ECS cluster and it gets stuck with an InternalError, don’t worry — this is usually a problem on Amazon’s side, not yours. This often happens when an instance is in the DRAINING state, has no running tasks, and the agent is disconnected. When you see a Server.InternalError in CloudTrail, it’s a sign of a temporary service issue that might clear up on its own.
Here are some simple steps to fix the problem without needing to upgrade your support plan:
First, give it a few minutes and try again. These internal errors often don’t last long, so waiting and retrying can fix the issue. You can do this either through the command line or in the AWS console.
Next, try deregistering the container instance before terminating it. This means removing the instance from your ECS cluster so it shows as INACTIVE. After deregistration, you should have a better chance of shutting it down smoothly.
If the instance is part of an Auto Scaling group, check that scale-in protection isn’t enabled. Protection settings can stop instances from being terminated, so disable them if needed.
Also, verify that the EC2 instance itself isn’t in a weird state, like stopping or pending, which could block termination.
If these steps don’t work and the InternalError keeps showing up over multiple attempts and time, it’s probably time to contact AWS support. Basic plans don’t include technical support, but persistent issues like this can be serious and might need AWS engineers to step in. Upgrading to at least Developer support can help you open a case and get this resolved faster.
Remember, these internal errors can happen in any region, including me-south-1, and usually need AWS help to fix if they don’t go away quickly.
For more guidance, you can visit AWS’s troubleshooting articles on EC2 instance termination in ECS and their official documentation on ECS agent versions.


