andsens / build-debian-cloud

This project has been superseeded by andsens/bootstrap-vz and is no longer maintained - Script to create Debian Squeeze & Wheezy Amazon Machine Images (AMIs) and Google Compute Engine images
Other
117 stars 43 forks source link

must have iam role #51

Closed michft closed 11 years ago

michft commented 11 years ago

Tasks 10 and 11 if an IAM role is not set on the ec2 instance launching the ec2debian-build-ami run.

Run task: 07-host-information Run task: 10-create-volume Unable to create volume.

because the output of CMD is $ aws ec2 create-volume --region "ap-southeast-2" --availability-zone "ap-southeast-2a" --size "1" 'NoneType' object has no attribute 'access_key'

because https://github.com/aws/aws-cli/issues/12

and the code relies on
wget http://169.254.169.254/latest/meta-data/iam/

but wget http://169.254.169.254/latest/meta-data/iam/ --2013-01-29 02:14:03-- http://169.254.169.254/latest/meta-data/iam/ Connecting to 169.254.169.254:80... connected. HTTP request sent, awaiting response... 404 Not Found 2013-01-29 02:14:03 ERROR 404: Not Found.

andsens commented 11 years ago

OK, something else must be going on here, because I have always tested the bootstrapping process without an IAM role set and it works just fine. ec2debian-build-ami also only fetches info from the URL http://169.254.169.254/latest/dynamic/instance-identity/document and never from http://169.254.169.254/latest/meta-data/iam/. The bootstrapper doesn't use aws-cli but euca2ools. Could you try running the bootstrapper with --debug? That would yield a lot more information to track down the problem.

michft commented 11 years ago

tracked it to a typo in

export AWS_CONFIG_FILE=/home/ubuntu/.aws

The IAM role missed, the AWS_CONFIG_FILE was and wrong and borked. Sorry to waste your time.

andsens commented 11 years ago

Sorry to waste your time.

No worries ;-)