user1025488
user1025488

Reputation: 221

How to create "Instance Store" AMI image of a Reserved Instance with no EBS

I have some micro instances with EBS volumes and from the ec2 console you can right click and create a AMI image of the whole system.

But I bought some High-Memory Reserved Instances which had 500GB of storage so I installed a "Instance Store" ubuntu AMI image

Now I have configured everything on my server and want to create a instance store ami image so that I can install those images on new servers and I don't have to install everything again

How can I do this?

Upvotes: 6

Views: 2743

Answers (1)

Magnus
Magnus

Reputation: 3751

This is how you do it with Ubuntu: Launch desired instance from here (pick one without EBS storage): http://cloud-images.ubuntu.com/releases/precise/release/

Follow this guide here (look below for hints concerning Ubuntu): http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-snapshot-s3-linux.html

  1. First you need to create you public key and certificate using this guide (you will need them later): http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-credentials.html#using-credentials-certificate
  2. Also note your AWS Account ID: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-credentials.html#using-credentials-account-id
  3. Upload your pk and cert to your ubuntu instance that you downloaded: scp -i <path-to-your-ec2key>.pem <your-account-pk>.pem <your-account-cert>.pem ubuntu@<yourinstance>.<yourzone>.compute.amazonaws.com:~/
  4. That puts the pk-file and cert-file in you home directory in your running instance. Now login and move these to the /mnt directory so that they do not get included when you bundle your AMI.
  5. Now modify your image to your hearts content.
  6. Install EC2 AMI Tools: sudo apt-get install ec2-ami-tools
  7. Run the following command to create your bundle: ec2-bundle-vol -k <your-account-pk>.pem -c <your-account-cert>.pem -u <user_id>
  8. Se guide above for the rest. You need to upload you bundle to S3 and then register your AMI so you can launch it.

Good Luck!

Upvotes: 6

Related Questions