Amazon Elastic Compute Cloud
User Guide (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Monitoring Events for Your Instances

Instance status describes specific events that Amazon Web Services (AWS) may schedule for your instances. Events provide information about upcoming activities, such as rebooting or retirement, that are planned for your instances, along with the scheduled start and end time of each event. These scheduled events are not frequent. There are several types of scheduled events:

  • Instance reboot: AWS may schedule an instance for a reboot for necessary maintenance, such as to apply patch upgrades to an underlying host that do not require the host to be rebooted.

  • System reboot: AWS may schedule an instance for a reboot for necessary maintenance, such as to apply patch upgrades that do require the host to be rebooted.

  • Network maintenance: AWS may schedule network maintenance that includes a scheduled start and end time, during which your instances will not have network connectivity. You will be notified by email if one of your instances is set for network maintenance. The email message indicates when your instance will not have network connectivity.

  • Power maintenance: AWS may schedule power maintenance that includes a scheduled start and end time, during which your instances may be offline for an extended period and then be rebooted. You will be notified by email if one of your instances is set for power maintenance. The email message indicates when your instance will be rebooted.

  • Instance retirement: AWS may schedule instances for retirement in cases where there is an unrecoverable issue with the hardware on an underlying host. You will also be notified by email if one of your instances is set to retiring. The email message indicates when your instance will be permanently retired.

  • Instance stop: AWS may schedule instances to stop in cases where there is an unrecoverable issue with the hardware on an underlying host. You will also be notified by email if one of your instances is set to stop. The email message indicates when your instance will be stopped.

Important

No action is required on your part if one of your instances is scheduled for reboot. We recommend that you wait for the reboot to occur within its scheduled maintenance window.

For instances scheduled for network maintenance, power maintenance, stop, or retirement, we recommend that you take the actions detailed later in this section.

Monitoring Events with Instance Status

You can view scheduled events for your instances using the AWS Management Console, the command line interface (CLI), or the API.

AWS Management Console

To view scheduled events for your instances

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the Navigation pane, click Events. You can see a list of all resources with events associated with them. You can view only instances list of instances that have upcoming events scheduled.

  3. Alternatively, you can do the following to view upcoming scheduled events:

    1. In the Navigation pane, click the EC2 Dashboard.

    2. Under Events, you can see the events associated with your Amazon EC2 instances and volumes.

    3. On the Events page, in Viewing, select Instances to view only instances. You can also filter on specific status types.

Command Line Interface

To view scheduled events for your instances

  • Enter the following command:

    ec2-describe-instance-status 

    Amazon EC2 returns output similar to the following:

    INSTANCE	i-1a2b3c4d	us-east-1d	running	16	ok	ok	active	
    SYSTEMSTATUS	reachability	passed	
    INSTANCESTATUS	reachability	passed	
    INSTANCE	i-2a2b3c4d	us-east-1d	running	16	ok	ok	active	
    SYSTEMSTATUS	reachability	passed	
    INSTANCESTATUS	reachability	passed	
    INSTANCE	i-3a2b3c4d	us-east-1d	running	16	ok	ok	active	
    SYSTEMSTATUS	reachability	passed	
    INSTANCESTATUS	reachability	passed	
    INSTANCE	i-4a2b3c4d	us-east-1d	running	16	ok	ok	retiring	YYYY-MM-DDTHH:MM:SS+0000
    SYSTEMSTATUS	reachability	passed	
    INSTANCESTATUS	reachability	passed	
    EVENT	instance-stop	YYYY-MM-DDTHH:MM:SS+0000	The instance is running on degraded hardware
    INSTANCE	i-5a2b3c4d	us-east-1d	running	16	ok	ok	retiring	YYYY-MM-DDTHH:MM:SS+0000
    SYSTEMSTATUS	reachability	passed	
    INSTANCESTATUS	reachability	passed	
    EVENT	instance-retiring	YYYY-MM-DDTHH:MM:SS+0000	The instance is running on degraded hardware
    INSTANCE	i-6a2b3c4d	us-east-1d	running	16	ok	ok	retiring	YYYY-MM-DDTHH:MM:SS+0000
    SYSTEMSTATUS	reachability	passed	
    INSTANCESTATUS	reachability	passed	
    EVENT	instance-stop	YYYY-MM-DDTHH:MM:SS+0000	The instance is running on degraded hardware

For more information about using the ec2-describe-instance-status command, see ec2-describe-instance-status in the Amazon Elastic Compute Cloud Command Reference Guide.

API

You can use the DescribeInstanceStatus action to retrieve the status of your instances. For more information, see DescribeInstanceStatus in the Amazon Elastic Compute Cloud API Reference Guide.

Working with an Instance that Has a Scheduled Event

This section discusses tasks you can perform if your instance has one of the following scheduled events.

  • Instance or system reboot

  • Network maintenance

  • Power maintenance

  • Instance retirement

Recommended Tasks for Instances Scheduled for a Reboot

AWS may schedule instances for a reboot to perform maintenance tasks such as patch upgrades to the software on an underlying host. These scheduled reboots are not frequent. There are two types of reboot events: system reboot and instance reboot. In either case, your instance will be rebooted. During a system reboot, the hardware supporting your instance will also be rebooted. During an instance reboot, your instance will be rebooted but the hardware supporting the instance will not be rebooted.

Important

No action is required on your part if one of your instances is scheduled for reboot. We recommend that you wait for the reboot to occur automatically within its scheduled maintenance window.

Scheduled reboot events start within their scheduled maintenance window. After initiation, both system and instance reboots typically complete in a matter of minutes. After a reboot completes, your instance is available to use; it is not necessary to wait until the scheduled end time.

To verify that the reboot has occurred, check your scheduled events and verify that the instance no longer shows a scheduled event. We recommend that you check your instance after it is rebooted to ensure that your application is functioning as you expected.

Optional Alternative Tasks for Instances Scheduled for Reboot

We recommend that you wait for the reboot to occur automatically within its scheduled window. If you choose, you may perform the instance reboot yourself to control the timing of the event.

Instance Reboot

For instance reboot events, you can perform the reboot yourself (be careful to not shut down or terminate your instance) at any time before the scheduled reboot event begins. The reboot can be initiated using the AWS Management Console, a RebootInstances API call, or from within the instance (e.g., at the command prompt). After you reboot, any pending maintenance to the underlying host is performed automatically, and you can begin using your instance again after the instance has fully booted.

Note

After you perform the reboot, the scheduled event for the instance reboot is canceled immediately. The event's description is updated in the AWS console to reflect this.

System Reboot

If you choose to perform a system reboot, your course of action will differ depending on whether your instance’s root device volume is an EBS volume or an instance store volume. You can determine the root device type for an instance using either the DescribeInstances API or the AWS Management Console. In the console, you select an instance and view the root device type listed in the Description tab.

Instances Backed by Amazon EBS

If your instance’s root device is an EBS volume, you can stop and restart it (be careful not to shut down or terminate your instance). If you choose to do so, some configuration settings will changes.

If you stop and restart your instance, the following changes occur. If you wait for Amazon EC2 to perform the scheduled reboot automatically, these configuration settings remain the same.

  • Data in instance store will no longer be available. Before you stop the instance, back up any data you may need.

  • The public DNS name and the private IP address of the instance will change.

  • If you associated an Elastic IP address with this instance, stopping this instance also disassociates the Elastic IP address from it (charges still apply). After you start the instance, re-associate it with the Elastic IP address if the address is still required.

  • For instances in Amazon Virtual Private Cloud (Amazon VPC), the Elastic IP address and the private IP address remain unchanged.

Before you stop and restart an instance, perform the following tasks:

  1. Retrieve any data from instance store that you will need later. This data will not be available after you stop and restart an instance.

  2. Take a snapshot of your existing volume (storage charges will apply).

  3. Note the necessary configuration data in case you will need it later, including the DNS public name and the private IP address.

  4. Stop and restart your instance. For more information, see Stopping and Starting Instances.

  5. Re-associate an Elastic IP address if this address is necessary.

  6. If other applications or instances rely on the public DNS name or the private IP address of this instance, update the information with the new configuration data.

Note

After you stop and restart the instance, the scheduled event for the system reboot is canceled immediately. The event's description is updated in the AWS console to reflect this.

Instances Backed by Instance Store

If your instance’s root device is an instance store volume and you cannot wait for AWS to reboot your instance in the scheduled maintenance window, you can opt to launch a replacement instance. After you have launched the replacement instance, you can terminate the original instance. If you choose to take this action, be aware that:

Instances Scheduled for Network Maintenance, Power Maintenance, Stop, or Retirement

The following section outlines steps you can take to migrate or replace instances that are scheduled for network maintenance, power maintenance, or retirement. If you migrate your instances scheduled for network maintenance, power maintenance, stop, or retirement before the maintenance start time, the maintenance event will automatically be cancelled.

Instances Backed by Amazon EBS

If your instance’s root device is an EBS volume, you can stop and restart it (be careful not to shut down or terminate the instance). If you choose to do so, some configuration settings will change. The following changes occur:

  • Data in instance store will no longer be available. Before you stop the instance, back up any data you may need.

  • The public DNS name and the private IP address of the instance will change.

  • If you associated an Elastic IP address with this instance, stopping this instance also disassociates the Elastic IP address from it (charges still apply). After you start the instance, re-associate it with the Elastic IP address if the address is still required.

  • For instances in Amazon Virtual Private Cloud (Amazon VPC), the Elastic IP address and the private IP address remain unchanged.

Before you stop and restart an instance, perform the following tasks:

  1. Retrieve any data from instance store that you will need later. This data will not be available after you stop and restart an instance.

  2. Take a snapshot of your existing volume (storage charges will apply).

  3. Note the necessary configuration data in case you will need it later, including the DNS public name and the private IP address.

  4. Stop and restart your instance. For more information, see Stopping and Starting Instances.

  5. Re-associate an Elastic IP address, if this address is necessary.

  6. If other applications or instances rely on the public DNS name or the private IP address of this instance, update the information with the new configuration data.

Note

After you stop and restart the instance, the scheduled event is canceled immediately. The event's description is updated in the AWS console to reflect this.

Instances Backed by Instance Store

If your instance’s root device is an instance store volume and your instance is scheduled for network maintenance, power maintenance, stop, or retirement, you can opt to launch a replacement instance. After you have launched a replacement instance, you can terminate the original instance. If you choose to take this action, be aware that: