Troubleshoot an unreachable instance - 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).

Troubleshoot an unreachable instance

You can use the following methods to troubleshoot an unreachable Linux instance. For information about troubleshooting an unreachable Windows instance, see Troubleshoot an unreachable instance in the EC2 User Guide for Windows.

Instance reboot

The ability to reboot instances that are otherwise unreachable is valuable for both troubleshooting and general instance management.

Just as you can reset a computer by pressing the reset button, you can reset EC2 instances using the Amazon EC2 console, CLI, or API. For more information, see Reboot your instance.

Instance console output

Console output is a valuable tool for problem diagnosis. It is especially useful for troubleshooting kernel problems and service configuration issues that could cause an instance to terminate or become unreachable before its SSH daemon can be started.

For Linux/Unix, the instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a computer. The console output returns buffered information that was posted shortly after an instance transition state (start, stop, reboot, and terminate). The posted output is not continuously updated; only when it is likely to be of the most value.

You can optionally retrieve the latest serial console output at any time during the instance lifecycle. This option is only supported on instances built on the Amazon Nitro System. It is not supported through the Amazon EC2 console.

Note

Only the most recent 64 KB of posted output is stored, which is available for at least 1 hour after the last posting.

Only the instance owner can access the console output.

Use one of the following methods to get console output.

Console
To get console output
  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/.

  2. In the left navigation pane, choose Instances.

  3. Select the instance and then choose Actions, Monitor and troubleshoot, Get system log.

Command line
To get console output

You can use one of the following commands. For more information about these command line interfaces, see Access Amazon EC2.

For more information about common system log errors, see Troubleshoot system log errors for Linux-based instances.

Capture a screenshot of an unreachable instance

If you are unable to reach your instance via SSH, you can capture a screenshot of your instance and view it as an image. The image can provide visibility as to the status of the instance, and allows for quicker troubleshooting.

You can generate screenshots while the instance is running or after it has crashed. The image is generated in JPG format and is no larger than 100 kb. There is no data transfer cost for the screenshot.

Limitations

This feature is not supported for the following:

Supported Regions

This feature is available in the following Regions:

  • US East (N. Virginia) Region

  • US East (Ohio) Region

  • US West (N. California) Region

  • US West (Oregon) Region

  • Africa (Cape Town) Region

  • Asia Pacific (Hong Kong) Region

  • Asia Pacific (Hyderabad) Region

  • Asia Pacific (Jakarta) Region

  • Asia Pacific (Melbourne) Region

  • Asia Pacific (Mumbai) Region

  • Asia Pacific (Osaka) Region

  • Asia Pacific (Seoul) Region

  • Asia Pacific (Singapore) Region

  • Asia Pacific (Sydney) Region

  • Asia Pacific (Tokyo) Region

  • Canada (Central) Region

  • Canada West (Calgary) Region

  • China (Beijing) Region

  • China (Ningxia) Region

  • Europe (Frankfurt) Region

  • Europe (Ireland) Region

  • Europe (London) Region

  • Europe (Milan) Region

  • Europe (Paris) Region

  • Europe (Spain) Region

  • Europe (Stockholm) Region

  • Europe (Zurich) Region

  • Israel (Tel Aviv) Region

  • South America (São Paulo) Region

  • Middle East (Bahrain) Region

  • Middle East (UAE) Region

Console
To get a screenshot of an instance
  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/.

  2. In the left navigation pane, choose Instances.

  3. Select the instance to capture.

  4. Choose Actions, Monitor and troubleshoot, Get instance screenshot.

  5. Choose Download, or right-click the image to download and save it.

Command line
To capture a screenshot of an instance

You can use one of the following commands. The returned content is base64-encoded. For more information about these command line interfaces, see Access Amazon EC2.

Instance recovery when a host computer fails

If there is an unrecoverable issue with the hardware of an underlying host computer, Amazon may schedule an instance stop event. You are notified of such an event ahead of time by email.

To recover an Amazon EBS-backed instance running on a host computer that failed
  1. Back up any important data on your instance store volumes to Amazon EBS or Amazon S3.

  2. Stop the instance.

  3. Start the instance.

  4. Restore any important data.

For more information, see Stop and start Amazon EC2 instances.

To recover an instance store-backed instance running on a host computer that failed
  1. Create an AMI from the instance.

  2. Upload the image to Amazon S3.

  3. Back up important data to Amazon EBS or Amazon S3.

  4. Terminate the instance.

  5. Launch a new instance from the AMI.

  6. Restore any important data to the new instance.

For more information, see Create an instance store-backed Linux AMI.