Loading...
 

Creating and using AMIs, Snapshots and Volumes

 

  • Lets say you started a new linux instance, installed some additional programs on it, specific for your use case, spending a lot of time trying to figure things out. Now, if you are not going to be using this instance for a few months, what do you do…

  • Even if you stop the machine, you dont want to keep the root volume sitting there adding to your billing. Instead, one of the easiest things to do is to create your own machine image out of this instance that you have customized. Storing this custom image would only cost you a fraction compared to keeping the EBS volume.

  • Next time when you want to run your program, you could simply create a new instance from your custom image.

1. Create a custom Amazon Machine Image (AMI)

  1. Click the “Instances” option from the EC2 console left hand menu.

  2. Click and choose the instance that you would like to create an image out of.

  3. Click the “Actions” menu and then chose “Image” - “Create Image” option.

 

zTTrOiZiibpMIpRPHXbsapj3Pr8BcEwD-8r2X75P1xu57s16Zc3cPB9c-kkdXTFnAg_yT7mpGJyj8JwDJvKDrDRtnkwdbtzmo2_q31bN-sGzQWRmCvxGFUe-VA6hcNy8kkA3QAbU

 

 


In the Create Image window, type a name for your custom image (Image Name), a description and then click “Create Image” button. “Close” any following confirmation window.

kky1ZGh2Uwqlaf3kf7-_bbNtd7IGG8lUkDjq5bAVZWSug5ZzVov-9O_HfWquqmJgoUz4FTOOv9jbT4AxlQ0zjS3ydMDgXHJFEcDoGqlLqa2gHamuWXqqroq4-FRwbauJzxDlTL84


2. Listing your AMIs

To view the list of your custom AMIs, Click the “AMIs” option in the EC2 console left hand menu bar, under the Images section. In the resulting AMI window, you will see the image that we just created (mylinuximage). You will also see that this image is marked as “Private” and is now “available” for you to use.

4V-2i2gpGwQSBVo8HogTsM44tqLfk3Yfck2Lvr-w6XYf72sI0jJiRwUHeUeSrqiqMSeUVPkaziK-ITHMUiN4zibfLzVPFgdRHdGM23GSlzJjWRIuWbEd6e6lZIcy2r8c5YDKP3Tp

 


3. Creating a new instance using custom AMI

To create a new instance using any of your custom AMIs, simple select the specific AMI from your list of AMIs and click the “Launch” button, as shown in the above screenshot. Once the launch instance wizard starts, follow the same procedure, starting from #2.2.4 as described in the Creating a basic linux instance tutorial.

4. Creating a snapshot

  • A snapshot is just a backup/archive of your volume, at any given time point. If you are not planning on working on your additional data volume for several months, you could just create a snapshot out of it and delete the original volume.

  • Snapshots cost about half of the volume price. Lets say you want to use your data volume after two months, you could simply create a new volume of the previously created snapshot in the appropriate zone and use it with your instances.

To create snapshot, choose the volume that you want to archive and then, click “Actions”, Create Snapshot.

 

VbCY64uYuqBXF8xDcsgPEC4zY0dFuoDsdVpuoIiNeMXvBM6bQSPkJjhahe8STmgDa1_a-g69gwKX_q_NeEFmTkaYQSHMAppFKXUCTz4emwDdq7Ss9iyQNbcX_rYEfGsBo8bZ4gd1


 


In the resulting “Create Snapshot” window, type a Description for your snapshot and click “Create Snapshot” button.

_0SkxLQxLXKnwXMyeXRErato_LkX0l5PLSNtIz4DbxTCND5dFZB31X7F8LzMjtAiJUW5PBheWCv5GJ1QMDEw2toREkzo6iI5PtSGVBmaRDj0PnUTa0VXRnJAjBOhRwW0FsHjfwPp


5. Listing your snapshots

To view the list of your snapshots, Click the “Snapshots” option in the EC2 console left hand menu bar, under the “ELASTIC BLOCK STORE” section. In the resulting snapshots window, you will see all of your snapshots and associated information.

9bLqZJtMjXg3sNAhS4X82BQ3aW_sQbUJIGsPQDyJE-GzbRcB5SnqTEPcOnRDcKysW5REzrkF2R0OElnKCDWnYEmjKBKcU3dNme7bjeM_iHz_J3m16Yyljvk9i7oGEudBsDtanKLl


6. Creating a new volume from a snapshot

To create a new volume from a specific snapshot, select the snapshot of your choice, as shown in the above screenshot and click “Actions”, “Create Volume” menu options as shown in the above screenshot.

In the resulting “Create Volume” window, choose the appropriate “Availability Zone” and click the “Create Volume” button, to create a new volume using an existing snapshot.

dDteO-tpsSJoqE71TR2jTYllcy0e6RK8tkl_5rfSe7PNzJqLz0Xu3e4NJ2eGdYbEmCclWZzI70lXpk1OZKwIhOR9Z0QrthifF9-MPYeyx8IBNq1iCv34QI82q45YQNgicgQOnltW