Create a credentials file (eg ~/.aws_creds) that looks something like this (variables must have have these exact names).
export AWS_ACCESS_KEY_ID='AKIASTUFF'
export AWS_SECRET_ACCESS_KEY='STUFF'
source this file
source ~/.aws_creds
Note: You must source this file in each shell that you want to run cloud.rb
yum install -y ansible python-boto
./cloud.rb aws list