How To Add AWS EC2 API Tools to Ubuntu AMI Instance

https://help.ubuntu.com/community/EC2APITools
https://help.ubuntu.com/community/Repositories/CommandLine#Adding_the_Universe_and_Multiverse_Repositories
As root in /root:
vim /etc/apt/sources.list
## Added to the bottom:
deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
apt-get update
apt-get install sun-java5-jre
apt-get install unzip
wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-34128.zip
unzip ec2-api-tools-1.3-34128.zip
export EC2_HOME=/root/ec2-api-tools-1.3-34128
export PATH=$PATH:$EC2_HOME/bin
mkdir .pem
Copy downloaded X.509 private key and cert into /root/.pem.
export EC2_PRIVATE_KEY=/root/.pem/pk-HNMKRRJUGKQM3TEYEPQRC6Y436P2ODLT.pem
export EC2_CERT=/root/.pem/cert-HNMKRRJUGKQM3TEYEPQRC6Y436P2ODLT.pem
To test:
ec2-describe-images -o self -o amazon
Leave Your Comment
All fields marked with "*" are required.