πŸš€ LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
πŸŽ“ COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.
HTML MASTER CLASS /// LEARN TAGS /// BUILD STRUCTURE /// SEMANTIC WEB /// HTML MASTER CLASS /// LEARN TAGS ///

The Persistent Drive in Cloud Computing

Learn about The Persistent Drive in this comprehensive Cloud Computing tutorial. Why we use block storage and how it differs from object storage.

⚑ Total XP: 0|πŸ’» cloud XP: 0

Skill Matrix

UNLOCK NODES BY LEARNING NEW TAGS.

Select an unlocked node to view details root

πŸš€ LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
πŸŽ“ COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.

1Block vs Object

EBS is Block Storage. It behaves like a raw, unformatted hard drive. You install file systems on it (like ext4 or NTFS) and it can boot operating systems. S3, on the other hand, is Object Storage, accessed via APIs, and cannot run an OS.

2The Magic of Snapshots

Snapshots are incremental. If you have a 100GB volume and take a snapshot, it backs up 100GB. If you change 2GB of data and take another snapshot, the second snapshot only stores the 2GB difference, saving you massive amounts of money on backup storage.

3Step-by-Step Breakdown

What is EBS?. Amazon Elastic Block Store (EBS) provides block-level storage volumes for use with EC2 instances. Think of it as a virtual hard drive.

Persistence. Unlike Instance Store (temporary storage), EBS volumes persist independently from the life of an instance.

Availability Zone Bound. An EBS volume is tied to a specific Availability Zone (AZ). It can only be attached to instances in that same AZ.

Volume Types. AWS offers different types of EBS volumes depending on your needs: SSD (gp2/gp3, io1/io2) for fast random access, and HDD (st1, sc1) for large sequential workloads.

Snapshots. A snapshot is an incremental backup of your EBS volume stored in S3. It captures the state of the drive at a specific point in time.

Storage Check. If you want to attach an existing EBS volume to an EC2 instance, what restriction must you keep in mind?

  • β†’Must be in the same Region
  • β†’Must be in the exact same Availability Zone (AZ)
  • β†’Must be the same size as the RAM

Moving Volumes. To move a volume across AZs or Regions, you must first take a Snapshot, and then create a new Volume from that snapshot in the target AZ/Region.

Encryption. You can encrypt EBS volumes at rest using AWS KMS. The encryption is transparent to the EC2 instance.

Delete on Termination. By default, the root EBS volume is deleted when the EC2 instance is terminated, but additional attached volumes are preserved. You can change this behavior.

Completion. You now understand how to persist and backup your data.

Pascual Vila

Pascual Vila

Frontend Instructor // Code Syllabus

Common Pitfalls & Errors

The Error //

Assuming an EBS volume is automatically backed up

aws dlm create-lifecycle-policy --description "Daily snapshots" \ --state ENABLED --execution-role-arn arn:aws:iam::123456789012:role/DLMRole \ --policy-details file://policy-details.json

The Solution //

An EBS volume itself has no automatic point-in-time backup β€” only manual or scheduled snapshots create recoverable restore points. Set up Amazon Data Lifecycle Manager (DLM) to automate regular snapshots instead of relying on the volume's durability alone.

The Error //

Deleting an instance without checking whether its root EBS volume will be deleted too

aws ec2 modify-instance-attribute --instance-id i-1234567890abcdef0 \ --block-device-mappings '[{"DeviceName":"/dev/xvda","Ebs":{"DeleteOnTermination":false}}]'

The Solution //

By default the root volume's DeleteOnTermination flag is true, so terminating an instance silently destroys its root volume and any data on it. Set DeleteOnTermination to false for any volume holding data you need to survive instance termination.

Lesson Glossary

[01]EBS

Elastic Block Store; provides block level storage volumes for use with EC2 instances.

Code Preview
// EBS context

[02]Snapshot

A point-in-time backup of an EBS volume stored in Amazon S3.

Code Preview
// Snapshot context

[03]IOPS

Input/Output Operations Per Second; a measure of how fast a drive can read/write data.

Code Preview
// IOPS context

[04]Block Storage

A type of data storage used in SANs where data is stored in volumes (blocks) rather than files or objects.

Code Preview
// Block Storage context

Continue Learning