Introduction to Console Output and Rebooting Instances

Articles & Tutorials>Introduction to Console Output and Rebooting Instances
This tutorial shows how to capture console output of an instance and how to reboot instances using the EC2 SOAP or Query APIs.


Submitted By: Attila@AWS
Created On: January 18, 2007 2:13 PM GMT
Last Updated: February 8, 2007 7:23 AM GMT


This feature is supported from API version 2007-01-03 and its supporting command-line tools.


This feature provides a means to retrieve the console output for instances and to reboot instances. It is exposed via two separate calls using either the SOAP or Query EC2 APIs. Corresponding command line tools are also provided.

Console Output

Amazon EC2 instance console output reflects exactly the character based console output that would otherwise be displayed by a physical monitor attached to a machine. This output is buffered as it is produced by the instance and then posted to a store from which it can be retrieved by the instance's owner. The posted output is not continuously updated. Rather, it is updated shortly after instance boot, reboot and once the instance terminates when it is likely to be of most value. Only the most recent 64KB of posted output is stored and is available for a period of at least 1 hour after the last posting.

Example usage

Retrieve console output:

$ ec2-get-console-output  i-10a64379
2007-01-03 12:00:00
Linux version 2.6.16-xenU (builder@patchbat.amazonsa) (gcc version 4.0.1 20050727
(Red Hat 4.0.1-5)) #1 SMP Thu Oct 26 08:41:26 SAST 2006
BIOS-provided physical RAM map:
Xen: 0000000000000000 - 000000006a400000 (usable)
980MB HIGHMEM available.
727MB LOWMEM available.
NX (Execute Disable) protection: active
IRQ lockup detection disabled
Built 1 zonelists
Kernel command line: root=/dev/sda1 ro 4
Enabling fast FPU save and restore... done.

The output in this example has been truncated.

Rebooting Instances

A reboot instances request queues a reboot operation for one or more instances that will be carried out provided the instance(s) is (are) owned by the caller and the instance(s) is (are) running.

Example Usage

Reboot a single instance:

$ ec2-reboot-instances  i-10a64379


More details about this feature can be found in the “Using Get Console Output and Reboot Instances” section of the Developers Guide.
©2017, Amazon Web Services, Inc. or its affiliates. All rights reserved.