Lab: Working with EBS

This lab focuses on Amazon Elastic Block Store (Amazon EBS), a key underlying storage mechanism for Amazon EC2 instances. In this lab, you will learn how to create an Amazon EBS volume, attach it to an instance, apply a file system to the volume, and then take a snapshot backup.

Task 1: Create a New EBS Volume

Navigating Volumes.
Click Create Volume then configure:
Volume Type: General Purpose SSD (gp2)
Size (GiB): 1NOTE: You may be restricted from creating large volumes.
Availability Zone: Select the same availability zone as your EC2 instance.
Click Add Tag
In the Tag Editor, enter:Key: Name
Value: My Volume

Task 2: Attach the Volume to an Instance

new volume is attached to use

Task 3: Connect to Your Amazon EC2 Instance

Task 4: Create and Configure Your File System

displaying the disk statistics in the instance ( df -h)

create mounting directory then mount the volume
adding mounting directory into fstab
The output will now contain an additional line – /dev/xvdf:
create a file into the newly created mounted volume

Task 5: Create an Amazon EBS Snapshot

File has been deleted..

Task 6: Restore the Amazon EBS Snapshot

created new mount directory and mounted snapshot volume…deleted file is now appears

Reflect and discuss what you have created in the lab on your blog

In this lab we have ,

  • Created an Amazon EBS volume
  • Attached the volume to an EC2 instance
  • Created a file system on the volume
  • Added a file to volume
  • Created a snapshot of your volume
  • Created a new volume from the snapshot
  • Attached and mounted the new volume to your EC2 instance
  • Verified that the file you created earlier was on the newly created volume

Amazon Elastic Block Store (EBS) provides block level storage volumes for use with EC2 instances. EBS volumes are highly available and reliable storage volumes that can be attached to any running instance that is in the same AZ. EBS volumes that are attached to an EC2 instance are exposed as storage volumes that persist independently from the life of the instance.

For security reasons, data stored on EBS volumes may need to be encrypted you can launch your EBS volumes as encrypted volumes . If you choose to create an encrypted EBS volume and attach it to your EC2, data stored and snapshots are encrypted (”at rest”) . With data encrypted on your EBS volumes,you also ensure security for data “in-transit”

Amazon EBS pricing depends on the following:
Volumes : Total storage of all EBS volumes, charged as GB/month
Snapshots : Total snapshot storage consumed in AWS S3, EBS snapshot copying between regions is charged.
Data Transfer : inbound is free, outbound is charged

Leave a comment