AWS Assignment– 6
EBS (Elastic Block Store) for Linux Learners
Basic Questions
- Create a new gp3 EBS volume of 10 GiB from the AWS Console.
- Create a new gp2 EBS volume of 5 GiB using AWS CLI.
- Attach an EBS volume to a running EC2 instance from the console.
- Attach an EBS volume to a running EC2 instance using AWS CLI.
- List all available EBS volumes in your region using the CLI.
- Inside the Linux instance, identify the attached volume (lsblk).
- Format the new volume with the ext4 filesystem.
- Mount the formatted volume to /mnt/data.
- Write a sample file into the mounted directory.
- Unmount the volume and remount it at a new location /data.
- Detach the EBS volume from the EC2 instance using the Console.
- Detach the EBS volume using the AWS CLI.
- Delete an unused EBS volume from the Console.
- Create a snapshot of an EBS volume from the Console.
- Create a snapshot of an EBS volume using the AWS CLI.
- Explore available snapshot details with aws ec2 describe-snapshots.
- Restore a new EBS volume from an existing snapshot.
- Attach the restored volume to an instance and verify data persistence.
- Document the main differences between gp3, gp2, io1/io2, st1, and sc1 volumes.
- Check CloudWatch metrics for your EBS volume (IOPS, throughput, latency).
Intermediate Questions
- Create an io1 Provisioned IOPS volume with 3000 IOPS and attach it to an instance.
- Test write performance of the io1 volume using dd or fio commands.
- Create a st1 (Throughput Optimized HDD) volume for large file storage.
- Mount the st1 volume and upload a large log file to test throughput.
- Create an sc1 (Cold HDD) volume and attach it to a test instance.
- Compare CloudWatch metrics between gp3, st1, and sc1 volumes.
- Increase the size of a gp3 volume from 10 GiB to 20 GiB using the Console.
- Expand the filesystem inside Linux to use the resized volume.
- Modify volume type from gp2 to gp3 without downtime.
- Create an encrypted EBS volume with AWS-managed KMS key.
- Attach the encrypted volume to an instance and mount it.
- Copy files into the encrypted volume and verify encryption in the Console.
- Create a snapshot of an encrypted volume.
- Share an unencrypted snapshot with another AWS account.
- Enable cross-region copy of a snapshot.
- Enable cross-account copy of a snapshot.
- Configure tags for your EBS volumes to categorize them as dev, test, prod.
- Write a Linux script to back up /var/log to an EBS volume daily.
- Mount an EBS volume on /var/lib/mysql and store database files.
- Document cost comparison for gp3 vs gp2 vs io1 volumes.
Advanced Questions
- Create a volume from a snapshot, expand it, and restore a database backup into it.
- Configure an EC2 instance with multiple EBS volumes for /var/log and /home.
- Automate snapshot creation using AWS CLI and a cron job in Linux.
- Encrypt an existing unencrypted snapshot by copying it with encryption enabled.
- Create a script that monitors EBS usage and alerts when >80% full.
- Store Jenkins workspace data on a dedicated EBS volume and test persistence.
- Attach multiple EBS volumes to the same instance and configure RAID0 on Linux.
- Use CloudWatch to monitor IOPS and trigger an alarm if usage exceeds 3000.
- Backup and restore logs across regions using EBS snapshots.
- Final Hands-on Project:
- Launch EC2 instance with 2 attached volumes (/logs, /db)
- Enable gp3 + encrypted volumes with KMS
- Configure automated daily snapshots with cron + AWS CLI
- Test resizing and expanding filesystem
- Document a backup & recovery strategy + cost optimization plan