Create AMI for Ubuntu on Amazon EC2

Follow from steps over here to create AMI for Ubuntu instance on Amazon EC2:

There are some missing information.

The X509 Cert used at SCP can be get at AWS site.

download aws x509 Cert

Download pk-xxxx.pem and cert-xxxx.pem

#scp -i id_my_rsa_key pk-xxxx.pem cert-xxxx.pem

Issue: permission denied shown.

Solution: SSH go to remote server and change the permission of /mnt from 777 to 755


# ec2-bundle-vol -d /mnt -k /mnt/pk-xxxxxx.pem -c /mnt/cert-xxxxx.pem -u xxx –r i386

Issue: ERROR: You need to be root to run /home/ubuntu/ec2/current/lib/ec2/amitools/bundlevol.rb
Solution: # chroot /