Methods for terminating an instance - Amazon Elastic Compute Cloud

Methods for terminating an instance

There are four ways to perform a user-initiated instance termination: default terminate, terminate with skip OS shutdown, force terminate, and force terminate with skip OS shutdown. The following table compares the key differences between the termination methods:

Termination method Key purpose Use case CLI command
Default terminate Normal instance shutdown with attempted graceful OS shutdown. Typical instance termination.
aws ec2 terminate-instances \ --instance-id i-1234567890abcdef0
Terminate with skip OS shutdown Bypasses the graceful OS shutdown when terminating an instance. When bypassing graceful OS shutdown is required.
aws ec2 terminate-instances \ --instance-id i-1234567890abcdef0 \ --skip-os-shutdown
Force terminate Handles stuck instances. Attempts a default termination first; if instance fails to terminate, then forcibly terminates the instance. When instance is stuck in shutting-down state.
aws ec2 terminate-instances \ --instance-id i-1234567890abcdef0 \ --force
Force terminate with skip OS shutdown Force terminates and bypasses the graceful OS shutdown when terminating an instance. When force termination and bypassing graceful OS shutdown is required.
aws ec2 terminate-instances \ --instance-id i-1234567890abcdef0 \ --force \ --skip-os-shutdown

For instructions on how to use each method, see the following: