Host maintenance - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Host maintenance

With host maintenance, your Amazon EC2 instances on the degraded Dedicated Host are automatically rebooted on a replacement Dedicated Host during a scheduled maintenance event. This helps reduce application downtime and offloads the undifferentiated heavy-lift of maintenance to Amazon. Host maintenance is also performed for planned and routine Amazon EC2 maintenance.

Host maintenance is supported on all new Dedicated Host allocations made through Amazon EC2 console. For any Dedicated Host in your Amazon Web Services account or any new Dedicated Host allocated through AllocateHosts API, you can configure host maintenance for supported Dedicated Hosts. For more information, see Configuring host maintenance.

Host maintenance basics

When degradation is detected on a Dedicated Host, a new Dedicated Host is allocated. Degradation can be caused by degradation of the underlying hardware or detection of certain problematic conditions. Your instances on the degraded Dedicated Host are scheduled to be automatically rebooted on the replacement Dedicated Host.

The replacement Dedicated Host receives a new host ID, but retains the same attributes as the original Dedicated Host. These attributes include the following.

  • Auto placement settings

  • Availability Zone

  • Reservation

  • Host affinity

  • Host maintenance settings

  • Host recovery settings

  • Instance type

  • Tags

Host maintenance is available in all Amazon Web Services Regions for all supported Dedicated Hosts. For more information about Dedicated Hosts where host maintenance is not supported, see Limitations.

Your degraded Dedicated Host is released after all of your instances have been rebooted to a new Dedicated Host or stopped. You can access your instances on the degraded Dedicated Host before the scheduled maintenance event, but launching instances on the degraded Dedicated Host is not supported.

You can use the replacement Dedicated Host to launch new instances on the host before the scheduled maintenance event. However, some instance capacity on the replacement host is reserved for the instances that must be migrated from the degraded host. You can't launch new instances into this reserved capacity. For more information, see Instances on Dedicated Host.

Limitations

  • Host maintenance is not supported in Amazon Outposts, Amazon Local Zones, and Amazon Wavelength Zones.

  • Host maintenance cannot be turned on or off for hosts already within a host resource group. Hosts added to a host resource group retain their host maintenance setting. For more information, see Host resource groups.

  • Host maintenance is only supported on specific instance types. For more information, see Supported instance types.

Host maintenance versus host recovery

The following table shows the main differences between host recovery and host maintenance.

Host recovery Host maintenance
Accessibility Unreachable Reachable
State under-assessment permanent-failure
Action Recovery is immediate Maintenance is scheduled
Scheduling flexibility Cannot be rescheduled Can be rescheduled
Host Resource Group Supported Not supported

For more information about host recovery, see Host recovery.

Supported instance types

Host maintenance is supported for the following instance families:

  • General purpose: A1 | M4 | M5 | M5a | M5n | M5zn | M6a | M6g | M6i | M6in | M7a | M7g | M7i | T3

  • Compute optimized: C4 | C5 | C5a | C5n | C6a | C6g | C6gn | C6i | C6in | C7g | C7gn | C7i

  • Memory optimized: R4 | R5 | R5a | R5b | R5n | R6a | R6g | R6i | R6in | R7a | R7g | R7iz | u-12tb1 | u-18tb1 | u-24tb1 | u-3tb1 | u-6tb1 | u-9tb1 | X2iezn

  • Accelerated computing: G3 | G5g | Inf1 | P2 | P3

Instances on Dedicated Host

Amazon EC2 automatically reserves capacity on the replacement host for the instances that will be automatically migrated from the degraded host. Amazon EC2 does not reserve capacity on the replacement host for instances that can't be automatically migrated, such as instances with instance store root volumes. The reserved capacity can't be used to launch new instances.

Note

The Amazon EC2 console shows the reserved capacity as used capacity. It could appear that the instances are running on both the degraded host and the replacement host. However, the instances will continue to run only on the degraded host until they are stopped or they are migrated into the reserved capacity on the replacement host.

If you manually stop an instance on the degraded host that can be automatically migrated, the capacity that was reserved for that instance on the replacement host is released and becomes available for use.

During the scheduled maintenance event, the instances on the degraded host are rebooted and migrated into the reserved capacity on the replacement Dedicated Host. The migrated instances retain the same attributes as the ones on your degraded host, including the following.

  • Amazon EBS volume attachments

  • Elastic IP addresses

  • Instance ID

  • Instance metadata

  • Private IP address

You can stop and start an instance on the degraded host at any point before the scheduled maintenance event is initiated. Doing this reboots your instance on to another host, and your instance won't undergo scheduled maintenance. You must update your instance's host affinity to the new host where you want to reboot your instance. If you stop all instances on the degraded host before the maintenance event is initiated, the degraded host is released and the maintenance event is canceled. For more information, see Stop and start Amazon EC2 instances.

Note

The data on any local store volume is not preserved when you stop and start your instance.

Instances with an instance store volume as the root device are terminated after the specified termination date. Any data on the instance store volumes is deleted when the instances are terminated. Terminated instances are permanently deleted, and cannot be started again. For instances with instance store volumes as the root device, we recommend launching replacement instances on a different Dedicated Host using the most recent Amazon Machine Image, and migrating all available data to the replacement instances before the specified termination date. For more information, see Actions to take for instance retirement.

Instances that cannot be rebooted automatically are stopped after the specified date. You can start these instances again on a different host. Instances using an Amazon EBS volume as a root device continue to use the same Amazon EBS volume after being started on a new host.

You can set the order of instance reboot by rescheduling the start time of an instance reboot in https://console.amazonaws.cn/ec2/.

Configuring host maintenance

You can configure host maintenance for all supported Dedicated Hosts via Amazon Web Services Management Console or Amazon CLI. See the following table for more details.

Amazon Web Services Management Console
To enable host maintenance for your Dedicated Host using Amazon Web Services Management Console.
  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/.

  2. In the navigation pane, choose Dedicated Hosts.

  3. Select the Dedicated Host > Actions > Modify host.

  4. Select on in the Host maintenance field.

To disable host maintenance for your Dedicated Host using Amazon Web Services Management Console.
  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/.

  2. In the navigation pane, choose Dedicated Hosts.

  3. Select the Dedicated Host > Actions > Modify host.

  4. Select off in the Host maintenance field.

To view the host maintenance configuration for your Dedicated Host using Amazon Web Services Management Console.
  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/.

  2. In the navigation pane, choose Dedicated Hosts.

  3. Select the Dedicated Host, and in the Description tab, review the Host maintenance field.

Amazon CLI
To enable or disable host maintenance for your new Dedicated Host during allocation using Amazon CLI.

Use the allocate-hosts command.

Enable

aws ec2 allocate-hosts --region us-east-1 --quantity 1 --instance-type m3.large --availability-zone us-east-1b --host-maintenance on

Disable

aws ec2 allocate-hosts --region us-east-1 --quantity 1 --instance-type m3.large --availability-zone us-east-1b --host-maintenance off
To enable or disable host maintenance for your existing Dedicated Host using Amazon CLI.

Use the modify-hosts command.

Enable

aws ec2 modify-hosts --region us-east-1 --host-maintenance on --host-ids h-0d123456bbf78910d

Disable

aws ec2 modify-hosts --region us-east-1 --host-maintenance off --host-ids h-0d123456bbf78910d
To view the host maintenance configuration for your Dedicated Host using Amazon CLI.

Use the describe-hosts command.

aws ec2 describe-hosts --region us-east-1 --host-ids h-0d123456bbf78910d
Note

If you disable host maintenance, you receive an email notification to evict the degraded host and manually migrate your instances to another host within 28 days. A replacement host is allocated if you have Dedicated Host reservation. After 28 days, the instances running on the degraded host are terminated, and the host is released automatically.

Maintenance event

On detection of degradation, a maintenance event is scheduled 14 days later, to reboot your instances on a new Dedicated Host. You receive an email notification providing details about the degraded host, scheduled maintenance event, and maintenance time slots. For more information, see View scheduled events.

You can reschedule the maintenance event for any day up to seven days after the date of the scheduled event. For more information about rescheduling, see Reschedule a scheduled event.

The maintenance event usually takes a few minutes to complete. In the rare case of unsuccessful event, you receive an email notification to evict the instances on the degraded host within a specified time frame.

Host maintenance states

Your Dedicated Host is set to permanent-failure state when degradation is detected. You cannot launch instances on a Dedicated Host in the state of permanent-failure. On completion of maintenance event, the degraded host is released and put in the state of released, permanent-failure.

After detecting degradation on a Dedicated Host and before scheduling a maintenance event, host maintenance automatically allocates a replacement Dedicated Host in your account. This replacement host stays in a pending state until a maintenance event is scheduled. After the maintenance event is scheduled, the replacement Dedicated Host moves to the available state.

You can use the replacement Dedicated Host to launch new instances on the host before the scheduled maintenance event. However, some instance capacity on the replacement host is reserved for the instances that must be migrated from the degraded host. You can't launch new instances into this reserved capacity. For more information, see Instances on Dedicated Host.

Dedicated Host integrates with Amazon License Manager—Tracks licenses across your Amazon EC2 Dedicated Hosts (supported only in Regions in which Amazon License Manager is available). For more information, see the Amazon License Manager User Guide.

You must have sufficient licenses in your Amazon Web Services account for your new Dedicated Host. The licenses associated with your degraded host are released when the host is released after the completion of the scheduled maintenance event.

Pricing

There are no additional charges for using host maintenance, but the usual Dedicated Host charges apply. For more information, see Amazon EC2 Dedicated Hosts Pricing.

As soon as host maintenance is initiated, you are no longer billed for the degraded Dedicated Host. Billing for the replacement Dedicated Host begins only after it enters the available state.

If the degraded Dedicated Host was billed using the On-Demand rate, the replacement Dedicated Host is also billed using the On-Demand rate. If the degraded Dedicated Host had an active Dedicated Host Reservation, it is transferred to the new Dedicated Host.