- Newest
- Most votes
- Most comments
Based on the information available, when you encounter an InternalError during EC2 instance termination for DRAINING ECS instances, this indicates an AWS service-side issue rather than a configuration problem on your end.
For instances in DRAINING state with 0 running tasks and a disconnected agent, the normal termination process should work. When you encounter a Server.InternalError in CloudTrail, this suggests a temporary service issue that may resolve itself.
Here are some approaches you can try without requiring a support plan upgrade:
-
Wait and Retry: Internal errors are often transient. Wait a few minutes and attempt the termination again through either the CLI or Console.
-
Deregister the Container Instance First: Before terminating, try deregistering the container instance from your ECS cluster. Once deregistered, the instance status changes to INACTIVE, and you may have better success terminating it afterward.
-
Check Auto Scaling Group Settings: If these instances are part of an Auto Scaling group, verify that they don't have scale-in protection enabled, which could interfere with termination attempts.
-
Review Instance State: Ensure the EC2 instance itself isn't in a problematic state (like stopping or pending) that might cause termination conflicts.
However, if the InternalError persists across multiple attempts and time periods, this likely requires AWS engineering investigation. While Basic support doesn't include technical support cases, persistent service errors affecting your ability to manage resources may warrant upgrading to at least Developer support to open a case, as this appears to be a service-side issue rather than a usage question.
The me-south-1 region specification is noted, though internal errors can occur in any region and typically require AWS intervention to resolve if they persist.
Sources
Troubleshoot EC2 instance termination in Amazon ECS | AWS re:Post
Amazon ECS EC2 Container Instances - Amazon Elastic Container Service
Relevant content
- asked 3 months ago
- asked 2 years ago
