I am trying to attach a volume to an instance using the cli:
ec2-attach-volume 'vol-id' -i `curl http://169.254.169.254/2008-09-01/meta-data/instance-id` -d /dev/sdh
But this fails with the message:
+----------------------------+---------------------------------------------+ | Code | Message | +----------------------------+---------------------------------------------+ | InvalidInstanceID.NotFound | The instance ID 'i-myid' does not exist | +----------------------------+---------------------------------------------+
The instance id is actually the correct id for that instance so I am not sure what it is complaining about.
My ami is based off the jaunty image and is running in the same availability zone as my volume (eu-west-1a).