Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the valid instanceState's for the Amazon EC2 API?

What are the valid instanceState's for the Amazon EC2 API? It doesn't seem to be defined in the current API doc. Google doesn't turn up much. So far I know about:

  • 0: pending
  • 16: running
  • 32: shutting-down
  • 48: terminated

but I'm pretty sure I've seen an error state before.

Thanks!

like image 801
Gary Richardson Avatar asked Jan 12 '09 23:01

Gary Richardson


2 Answers

As of posting, the current states are:

+--------+---------------+
|  Code  |     State     |
+--------+---------------+
|   0    |    pending    | 
|  16    |    running    |
|  32    | shutting-down | 
|  48    |  terminated   |
|  64    |   stopping    | 
|  80    |   stopped     |
+--------+---------------+

And the documentation can be found within the Amazon Elastic Compute Cloud API reference under InstanceStateType

The docs also mention a state code 272 which "typically indicates a problem with the host running the instance". They suggest trying a reboot in the first instance, and posting on the EC2 forums if that doesn't solve the issue.

like image 167
chrisbunney Avatar answered Sep 21 '22 12:09

chrisbunney


The docs seem to have been moved, and I still can't find them. Here are two more state codes

  1. 64: stopping
  2. 80: stopped
like image 35
user421944 Avatar answered Sep 18 '22 12:09

user421944