I've been trying to utilize the --wait function to poll for when my EC2 instance comes up. However, it seems that, when I pass either the --wait function or the --simple option, all the output breaks and it does not wait/poll for my instance to come out of pending status. The AWS API call DOES work correctly, and my box still comes up, but I have to manually poll for status.
I'm using aws script version 1.75 on ubuntu 11.04. Shell output below.
Thanks for the head's up. I'm sorry it took me so long to address the issue. The latest restores the --wait feature. (I have to figure out why I don't get notifications from github!)
I've been trying to utilize the --wait function to poll for when my EC2 instance comes up. However, it seems that, when I pass either the --wait function or the --simple option, all the output breaks and it does not wait/poll for my instance to come out of pending status. The AWS API call DOES work correctly, and my box still comes up, but I have to manually poll for status.
I'm using aws script version 1.75 on ubuntu 11.04. Shell output below.
Great script, thanks for making it available!
Not passing --wait or --simple works:
john@jump0$ aws run -n 1 -v --group cluster --key control --type m1.small --availability-zone us-east-1d ami-XXXXXX aws version: v1.75 (ec2: 2010-11-15, sqs: 2009-02-01, elb: 2010-07-01, sdb: 2009-04-15, iam: 2010-05-08) sanity-check: Your system clock is 9 seconds behind. ec2(Action, RunInstances, MinCount, 1, MaxCount, 1, SecurityGroup.1, cluster, KeyName, control, InstanceType, m1.small, Placement.AvailabilityZone, us-east-1d, ImageId, ami-XXXX) data = GET\nec2.amazonaws.com\n/\nAWSAccessKeyId=XXXXXXX&Action=RunInstances&Expires=2011-10-03T22%3A16%3A58Z&ImageId=ami-XXXX&InstanceType=m1.small&KeyName=control&MaxCount=1&MinCount=1&Placement.AvailabilityZone=us-east-1d&SecurityGroup.1=cluster&SignatureMethod=HmacSHA1&SignatureVersion=2&Version=2010-11-15 +------------+--------------+---------------------+---------+--------------+--------------------------+-----------------------------+--------------+----------------+------------------------------+----------------+------------+ | instanceId | imageId | instanceState | keyName | instanceType | launchTime | placement | kernelId | monitoring | stateReason | rootDeviceType | hypervisor | +------------+--------------+---------------------+---------+--------------+--------------------------+-----------------------------+--------------+----------------+------------------------------+----------------+------------+ | i-XXXXX | ami-XXXX | code=0 name=pending | control | m1.small | 2011-10-03T22:16:28.000Z | availabilityZone=us-east-1d | aki-XXXXXX | state=disabled | code=pending message=pending | instance-store | xen | +------------+--------------+---------------------+---------+--------------+--------------------------+-----------------------------+--------------+----------------+------------------------------+----------------+------------+
Passing --simple:
john@jump0$ aws run -n 1 -v --simple --group cluster --key control --type m1.small --availability-zone us-east-1d --simple ami-XXXXX aws version: v1.75 (ec2: 2010-11-15, sqs: 2009-02-01, elb: 2010-07-01, sdb: 2009-04-15, iam: 2010-05-08) sanity-check: Your system clock is 9 seconds behind. ec2(Action, RunInstances, MinCount, 1, MaxCount, 1, SecurityGroup.1, cluster, KeyName, control, InstanceType, m1.small, Placement.AvailabilityZone, us-east-1d, ImageId, ami-XXXXX) data = GET\nec2.amazonaws.com\n/\nAWSAccessKeyId=XXXXXX&Action=RunInstances&Expires=2011-10-03T22%3A18%3A05Z&ImageId=ami-XXXXX&InstanceType=m1.small&KeyName=control&MaxCount=1&MinCount=1&Placement.AvailabilityZone=us-east-1d&SecurityGroup.1=cluster&SignatureMethod=HmacSHA1&SignatureVersion=2&Version=2010-11-15
Passing --wait:
john@jump0$ aws run -n 1 -v --wait=10 --group cluster --key control --type m1.small --availability-zone us-east-1d --simple ami-XXXXX aws version: v1.75 (ec2: 2010-11-15, sqs: 2009-02-01, elb: 2010-07-01, sdb: 2009-04-15, iam: 2010-05-08) sanity-check: Your system clock is 10 seconds behind. ec2(Action, RunInstances, MinCount, 1, MaxCount, 1, SecurityGroup.1, cluster, KeyName, control, InstanceType, m1.small, Placement.AvailabilityZone, us-east-1d, ImageId, ami-XXXXX) data = GET\nec2.amazonaws.com\n/\nAWSAccessKeyId=XXXX&Action=RunInstances&Expires=2011-10-03T22%3A26%3A57Z&ImageId=ami-XXXX&InstanceType=m1.small&KeyName=control&MaxCount=1&MinCount=1&Placement.AvailabilityZone=us-east-1d&SecurityGroup.1=cluster&SignatureMethod=HmacSHA1&SignatureVersion=2&Version=2010-11-15