What do I need to know when my Amazon EC2 instance is scheduled for retirement?
5 minute read
My Amazon Elastic Compute Cloud (Amazon EC2) instance is scheduled for retirement.
An EC2 instance is scheduled for retirement when Amazon Web Services (AWS) detects an irreparable failure in the infrastructure that hosts your instance.
Issues that lead to a scheduled retirement include:
Software-related issues that aren't recoverable and require a software replacement.
Hardware failures that require replacement, such as a faulty power supply, hard disk, or other server components.
Note: A retirement notice might appear in your AWS Health Dashboard until the scheduled event time. You can also view events scheduled for your instance from the Amazon EC2 console under Scheduled Events. Or, use the following commands to view scheduled events for your instance:
Actions to take before the instance retirement date
You must stop and then start the instance at your preferred time before the instance retirement date. The instance is moved to another healthy host when you stop and start the instance.
Important : Before you stop an instance, review the following information:
If you don't use an Elastic IP address, then the public IP address is released when you stop the instance.
If this instance has an instance store volume, then any data on it is lost when the instance is stopped. See the Stopping an instance with instance store volume attached section for more information. Note (Windows only): Instance store volumes are labeled as Temporary Storage in My Computer on the instance.
AWS doesn't guarantee capacity availability for On-Demand Instances. Capacity changes dynamically for On-Demand Instances. You might receive an InsufficientInstanceCapacity error when you start an instance that you previously stopped. To avoid this error, use On-Demand Capacity Reservations.
To prevent unforeseen downtime and data loss, take action to prepare before the instance retirement date. The action you take depends on your instance root device type. For more information, see:
When you receive an instance retirement notification, the underlying host is already in a state that blocks additional launches of instances on the hardware. The stop and start operations move your instance to new underlying hardware, and you don't need to take any action. Data stored in Amazon Elastic Block Store (Amazon EBS) volumes persist when you stop and restart your instance, so your data isn't lost.
Due to underlying hardware degradation, an EBS-backed instance can get stuck in a stopping state. You can use the Amazon EC2 console or AWS CLI to force the instance to stop. This action takes up to 10 minutes. For more information, see Troubleshoot stopping your instance.
Stop an instance with an instance store volume attached
Data stored on an instance store volume doesn't persist if an instance is stopped. To prevent data loss, use Remote Desktop Protocol (RDP) to connect to your instance. Then, move data located on the instance store volume to an attached EBS volume. For more information, see Instance store volume and data lifetime. If your instance root device is an instance store volume, then the instance is terminated when it's stopped and can't be used again.
Build for fault tolerance
Build for fault tolerance with proper architecture to reduce or eliminate downtime. For more information, see AWS Well-Architected.
Instances that become unreachable before the retirement date
Because instance retirement is often the result of unexpected software or hardware failure, the underlying host can become inaccessible before the scheduled retirement date. AWS attempts to keep the instance accessible until the date provided, and in some cases can restore the host to working condition.
To migrate the instance to a new, healthy host, stop and start the instance. After the stop and start, the instance retirement is no longer applicable, and no action is needed.