digitalspeed logo

Understanding EC2 AMI, Volumes, Snapshots and How to Use Them 

understanding EC2, AMI, EBS, snapshots

If you have recently started using EC2, configuring and deploying applications with it, it can quickly become confusing what those other resources usually associated with EC2 are. 

EBS (Elastic Block Store), Volumes, AMI (Amazon Machine Image), Snapshots, what are they really. 

Before I start with those, I might as well start with a modest explanation of AWS EC2, so you get a bigger picture because they are all related.

AWS Elastic Compute Cloud (EC2) 

An EC2 instance is a virtual server in Amazon Web Services (AWS) Elastic Compute Cloud (EC2) that allows users to run (deploy) servers on the cloud. It provides scalable computing capacity and allows users to configure the instance based on their needs, such as selecting the operating system, CPU, memory, and storage.  

To learn how to deploy an EC2 instance see AWS documentation getting started with EC2

AWS Amazon Machine Image (AMI) 

An Amazon Machine Image (AMI) is a comprehensive snapshot of an operating system and its configuration, essentially representing a full “disk” capture or put another way AMIs is template containing software configuration (operating system, application server, and applications) for creating virtual machines. When you initiate an instance, you do so from an AMI, which serves as the foundational template for your virtual server.  

AMIs can simply just contain the necessary software data to create a machine type like Bitnami, Ubuntu, CentOS, etc. These are referred to as template AMIs, while other AMIs, such as those created by AWS cloud developers and engineers for their instance, also contain machine data, files, databases, machine cache at the time and more, depending on the state of the machine before the snapshot was taken. 

In such cases, AMIs are not merely templates; they are used to recreate a machine to the state it was in when the image was captured.  

For example, I once created an image of one of my WordPress instances and recreated it, effectively restoring it to include all the posts, images, and other data from my WordPress website. 

AMIs typically have an associated snapshot, which stores the disk data of the instance. This means that when you create an image, a snapshot is also taken automatically and associated with the image. 

How to create an image (AMI)

  • Go to your EC2 instances dashboard, click on the instance you intend to create image for 
  • Select Actions button from the option, click on Image and template from the options

    navigate ec2 instance details page to create AMI
  • Select Create Image
  • Give it a name and a detailed description so you can quickly know the state of the instance when you created the image

    create ec2 instance image from ec2 instance
  • Click Create Image, you might have to drag your screen slightly to the right to see that option.

It might take some time to complete. I would advise that you are not connected to your instance remotely through SSH as at the time you create your image, I had some bad experiences when I did that. 

You can also create an image from a snapshot 

  • Navigate to the EC2 details page 
  • Select Snapshot from the options in the left 
  • You can see all the snapshots you have in that region, select the snapshot to see more details about it 
  • Click on the Actions button, click on create image from snapshot 
  • Give your image a name and a detailed description, you can add more new volumes to your image if you choose to. 
  • Click on create image to complete the process.

AWS EBS (Elastic Block Store) 

AWS Elastic Block Store (EBS) is a scalable block storage service designed for use with Amazon EC2 instances. It provides persistent storage volumes that can be attached to EC2 instances, offering high performance and durability. 

EBS is simply just acting as the hard drive for your EC2 instance, storing files, databases, and it’s persistent so instance data are saved in case the instance goes down.

With EBS, users can create, attach, and detach storage volumes to EC2 instances as needed, making it ideal for storing data, running databases, and hosting applications in the cloud. You can attach more than one EBS volume to an instance. 

EBS is an AWS technology offered as a service, you typically use EBS as volumes which we explained below. 

AWS EBS Volumes 

An AWS EBS volume is like a virtual hard drive for your EC2 instance. It stores your data and files, just like a hard drive does on your computer. Stated another way, it is a unit of AWS EBS storage service for EC2 instances, a unit is flexible, it can contain 20Gb, 40Gb, 100Gb of storage space depending on your needs. You can attach, detach, and resize EBS volumes as needed and you can create an EBS volume as a snapshot from another EBS volume. It’s a flexible and reliable way to store data for your applications running on AWS. 

Volumes can be attached and detached from any instances, but only connected to one instance at a time, just like the physical disk that they are a virtual abstraction of. 

How to create an EBS volume

  • Navigate to your EC2 instance page 
  • From the options on the left, select Volumes under EBS

    list of ebs volumes
  • You can now see all your Volumes, click on create volume button at the top left 
  • The new page requires you to put in details of your volumes like storage size, volume type, IOPS, throughput, availability zones, etc. Put in the details as required in your specification. If you are just practicing, then I advise you to use gp2 for volume type because it’s free tier eligible.
create aws ebs volumes

You can also create an EBS volume when you create your EC2 instance, and you can attach a greater number of volumes. 

You can detach or attached volume to your instance.

  • Navigate to your EC2 details page, and click on volumes from the options on the left under EBS.
  • Click on the volume you want to attach or detach 
  • Click on the Actions button 
  • If your volume is attached, then you can click on detach 
  • If your volume is not attached then you can click on attach, you will see the page below to select an instance to attach it to.
attach volume to instance from the volume page

You can also detach or attach volumes from the instance page

  • Select the instance you want to modify the volume for.
  • Click on the Actions button 
  • Select Monitor and Troubleshoot 
  • Select Replace root device 
  • Fill in the details on the replacement page, select a snapshot to use snapshot or an image to use an image. Your snapshot would be immediately converted to volume. 
  • Click on create replacement task.
replace ec2 instance ebs volume

Volumes are very similar to Snapshots; we get to know more about volumes below.

AWS Snapshots

Snapshots are essentially frozen images of your volume at a specific moment in time, capturing all its data. Even as you continue using the original volume, the snapshot remains unchanged. You can create new volumes from these snapshots, mirroring the exact state of the original volume when the snapshot was taken. 

The new volume would look exactly like your first disk did when you took the snapshot. You could start using the new volume in place of the old one to roll back your data, or maybe attach the same data set to a second machine. You can keep taking snapshots of volumes at any point in time. 

Snapshot uses S3 for storing EBS volume data while EBS volume, as you would guess uses EBS. Snapshot storage is incremental, meaning that only the changes since the last snapshot are stored, reducing storage costs and improving efficiency.

The main difference between a snapshot and a volume is that they use different storage technologies in storing their data and snapshots although containing the exact data as a volume cannot be attached to an EC2 instance, you must convert it to a volume first. 

How to create a snapshot 

  • Navigate to the EC2 details page.
  • Select Snapshots from the options in the left

    volume snapshots main page
  • You can see all the snapshots you have in that region, click on Create snapshot 
  • Select volume to create snapshot directly from a volume or select instance to create snapshot from a multi volume EC2 instance.




    create a snapshot directly from an ec2 instance
  • Select the instance or volume as intended in the instance ID or Volume ID 
  • Give your snapshot a detailed description so you can recall why you created it. 
  • Click create snapshot to complete the process.

You can create a snapshot directly from a volume.

  • Navigate to your EC2 details page, click on volumes from the options in the left under EBS 
  • Click on the volume you want to create a snapshot for
  • Click on the Actions button, select Create Snapshot 
  • Give it a nice description and click Create Snapshot
create ec2 snapshot from  ebs volume

Snapshots are S3 storage of the volumes of an EC2 instance, it is also very likely that they contain details about the instance type, OS (Operating System), applications installed, etc. That’s why you can create an instance image from a snapshot of the instance. 

Conclusion 

Snapshots are not images, but they can be used to create images because they contain other details of the instance that will be used to create the image. Instance Image (AMI) creates a snapshot of the EBS volumes every time you create a snapshot. 

Snapshots are very similar to EBS volumes using a different storage technology that’s why you can’t mount a snapshot to an EC2 instance. You can create a snapshot from a volume and vice versa. 

EBS volumes are like hard drives to EC2 instances where you store your files, and databases. 

EC2 can be very costly to manage, if you follow through to deployed resources just for practice, delete or release them so you don’t get charged unnecessarily. Confirm that you did not leave unnecessary instances for these resources.

  • EC2 instance 
  • Volumes 
  • Images (AMI) 
  • Elastic IP (non-attached) 
  • Snapshots 
  • Key pairs 

I would like to hear from you in the comment section, check out more articles below.

Please share this article at the top of the page under the share this button. Thanks

Recent Post

Send Us A Message

Related Post

Join our newsletter to stay updated

digitalspeed-logo

At DIGITALSPEED, you can get updates, reviews and learn about new digital tools and features on existing tools. check us on social media.

Get In Touch

Lagos, Nigeria

DIGITALSPEED © All Rights Reserved.

2025

Scroll to Top

Seach for Articles