Create an AMI - VertebrateResequencing/vr-pipe GitHub Wiki

An AMI, or Amazon Machine Image, is essentially the contents of a computer's boot drive, containing the Operating System, installed software, and special things that make it bootable. You need one to launch a new EC2 instance. When you have a running EC2 instance you can create your own AMI based on the current state of that instance. You might do this after installing some software or changing some configuration, for example, so that the next time you launch an EC2 instance you won't have to install that software again.

Assuming you're logged into a running EC2 instance:

  1. If this AMI will be made public, clean things up so it is secure:
    sudo su
    find /root/.*history /home/*/.*history -exec rm -f {} \;
    find / -name "authorized_keys" -exec rm -f {} \;
    exit
  2. Go to the instance pane of your EC2 management console, select your instance, click the Actions button to open its menu, then click "Create Image (EBS AMI)". use actions menu to create image
  3. In the Create Image wizard, provide a name and description and click "Yes, Create". (Doing this will log you out of your instance, after which you won't be able to log back in if you deleted authorized_keys - you have been warned.)
    fill out the create image wizard
  4. Visit your AMIs pane and wait for the process to complete. wait for the ami to be made
  5. If you deleted authorized_keys you can no longer log into the instance you launched to create this AMI, so terminate it.
  6. You can now launch an instance with your AMI either from the AMIs pane using the "Launch" button, or by selecting it in the EC2 launch wizard. If you would like to make your AMI public (should not be necessary), that is beyond the scope of this guide. See this Amazon guide instead.