What do I need to know when my Amazon EC2 instance is scheduled for retirement?
My Amazon Elastic Compute Cloud (Amazon EC2) instance is scheduled for retirement. What does that mean?
An EC2 instance is scheduled for retirement when Amazon Web Services (AWS) detects an irreparable failure in the infrastructure that's hosting your instance.
Issues that can 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 Personal 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:
From the AWS Command Line Interface (AWS CLI):
Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.
From AWS Tools for Windows PowerShell:
Actions to take before the instance retirement date
You are required to stop and then start the instance at your preferred time before the instance retirement date. Stopping and starting the instance moves the instance to another healthy host.
Warning: Before you stop an instance, be aware of the following:
- If you're not using an Elastic IP address, the public IP address is released when you stop the instance.
- If this instance has an instance store volume, 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.
- If the instance shutdown behavior is set to Terminate, the instance terminates when it's stopped.
- If your instance is part of an Amazon EC2 Auto Scaling group, or if your instance is launched by services that use AWS Auto Scaling, such as Amazon EMR, AWS CloudFormation, AWS Elastic Beanstalk, and so on, then stopping the instance could terminate the instance. Instance termination in this scenario depends on the instance scale-in protection settings for your Auto Scaling group. If your instance is part of an Auto Scaling group, temporarily remove the instance from the Auto Scaling group before working through these resolution steps.
- Be aware the AWS doesn't guarantee capacity availability for On-Demand Instances. Capacity changes dynamically for On-Demand Instances, so you might receive an InsufficientInstanceCapacity error when trying to start an instance that you stopped. To avoid this error, you can 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, and to determine if your instance root device is an Amazon Elastic Block Store (Amazon EBS) volume or an instance store volume, see:
Stopping and starting an EBS-backed instance
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 further action. You don't need to worry about losing data. Data stored in EBS volumes persist when stopping and restarting your instance.
Due to underlying hardware degradation, an EBS-backed instance can get stuck in a stopping state. You can force the instance to stop using the console or AWS Command Line Interface (AWS CLI). This action can take up to 10 minutes. For more information, see Troubleshooting stopping your instance.
Stopping 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, connect to your instance using Remote Desktop Protocol (RDP). Then, move data located on the instance store volume to an attached EBS volume. For more information, see Instance store lifetime. If your instance root device is an instance store volume, the instance is terminated when it is stopped and can't be used again.
Building for fault tolerance
Reduce or eliminate downtime with proper architecture by building for fault tolerance. 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, you can stop and start the instance. After the stop and start, the instance retirement is no longer applicable and no further action is required.
For more information, see I received a notice stating that Amazon EC2 detected degradation of the underlying hardware hosting my EC2 instance. What do I need to do?
- Warum erhalte ich die Fehlermeldung „VolumeInUse“, wenn ich versuche, ein io2-Block-Express-Volume von Amazon EBS an meine EC2-Instance anzuhängen?AWS OFFICIALAktualisiert vor 4 Monaten
- Wie behebe ich „Persistent store is full“ (persistenter Speicher ist voll)-Fehler in Amazon MQ for ActiveMQ?AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor 8 Monaten