AWS EC2 EBS Hands-On | A Step-by-Step Guide

Divya MahajanDivya Mahajan
3 min read

Create New EBS (Elastic Block Store) Volume

  1. In the EC2 dashboard, locate and click on "Volumes" in the left-hand sidebar under the "Elastic Block Store" section.

  2. Click on the "Create Volume" button.

  3. Select Volume Type, Size, Select availability zone same as your instance, tags, encryption( if required) and create.

  4. Click on the "Create" button to create your new security group.


Attach the Volume to EC2 Instance

  1. In the EC2 dashboard, locate and click on "Volumes" in the left-hand sidebar under the "Elastic Block Store" section.

  2. Select the newly created Volume from the volume dashboard.

  3. Click on the "Actions" dropdown menu and choose "Attach Volume".

  4. Select the instance(s) you want to associate with the Volume and click "Attach Volume."


Review EC2 Instance

  1. In the EC2 dashboard, locate and click on "Instance" in the left-hand sidebar under the "Instances" section.

  2. Go to you running Instance from Instances Interface's list

  3. Go to storage Tab, where you should be seeing newly attached Volume

  4. We created 8GiB Volume and the default ID was attached by default. We can analyze the existing EBS volumes, attached to our instance by default

  5. You can scroll all the way to the right to check the "Delete on termination flag" which is by default on for root volume.

  6. Let's click on the Volume ID

We reached Volume interface with our Volume Id's filter. Let's go inside it

  1. Click on the Volume ID and analyze it


Create EBS Snapshots

  1. In the EC2 dashboard, locate and click on "Volumes" in the left-hand sidebar under the "Elastic Block Store" section.

  2. Select the newly created Volume from the volume dashboard.

  3. Click on the "Actions" dropdown menu and choose "Create Snapshot".

  4. Add Description, Tags, and click Create Snapshot

  5. Review the snapshots in the "Snapshots" tab and then click on the desired created snapshot to review it

  6. Now you can click on "Actions" and

    • Create Volumes of snapshots

    • create a copy to another region

    • create image from snapshots

This is very handy for backup and restore, in case of disaster to create a duplicate volume from last backed up stage of the Volume via snapshot.


Create Retention Rule of Recycle Bin

  1. In the EC2 dashboard, locate and click on "Snapshots" in the left-hand sidebar under the "Elastic Block Store" section.

  2. Click on "Recycle Bin"

  3. Click on "create retention rule"

  4. Add Retention rule name

  5. Add Retention settings like Resource type as snapshots or AMI Images

  6. You can choose resources or apply to all resource, and add Retention period Rule

  7. Lock settings allow you to locked where the retention rule can't be modified or deleted or unlocked to modify and delete any time by a user with the required permissions.

  8. Click on create

  9. To Test it Let's delete our snapshot

    • In the EC2 dashboard, locate and click on "Snapshots" in the left-hand sidebar under the "Elastic Block Store" section.

    • Select the snapshot to be deleted

    • Go to "Actions" and click "Delete snapshot"

  10. Let's go back to "Recycle Bin" and review it in the resources of Recycle Bin

  11. We can select and click on "recover" for recovery

0
Subscribe to my newsletter

Read articles from Divya Mahajan directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Divya Mahajan
Divya Mahajan

Experienced Technical developer with 6+ years' global collaboration. Proficient in Python, Go, React, Next.js, Django, various databases, Cloud & DevOps (AWS EC2, Docker, Kubernetes), and Big Data tools. Skilled in data structures and algorithm, API development, and end-to-end software engineering. Excels in back-end development, front-end design, Root Cause Analysis, and product management to deliver superior user experiences. Holds a master’s degree in computer engineering.