AWS Assignment– 6

EBS (Elastic Block Store) for Linux Learners

Basic Questions

  1. Create a new gp3 EBS volume of 10 GiB from the AWS Console.
  2. Create a new gp2 EBS volume of 5 GiB using AWS CLI.
  3. Attach an EBS volume to a running EC2 instance from the console.
  4. Attach an EBS volume to a running EC2 instance using AWS CLI.
  5. List all available EBS volumes in your region using the CLI.
  6. Inside the Linux instance, identify the attached volume (lsblk).
  7. Format the new volume with the ext4 filesystem.
  8. Mount the formatted volume to /mnt/data.
  9. Write a sample file into the mounted directory.
  10. Unmount the volume and remount it at a new location /data.
  11. Detach the EBS volume from the EC2 instance using the Console.
  12. Detach the EBS volume using the AWS CLI.
  13. Delete an unused EBS volume from the Console.
  14. Create a snapshot of an EBS volume from the Console.
  15. Create a snapshot of an EBS volume using the AWS CLI.
  16. Explore available snapshot details with aws ec2 describe-snapshots.
  17. Restore a new EBS volume from an existing snapshot.
  18. Attach the restored volume to an instance and verify data persistence.
  19. Document the main differences between gp3, gp2, io1/io2, st1, and sc1 volumes.
  20. Check CloudWatch metrics for your EBS volume (IOPS, throughput, latency).

Intermediate Questions

  1. Create an io1 Provisioned IOPS volume with 3000 IOPS and attach it to an instance.
  2. Test write performance of the io1 volume using dd or fio commands.
  3. Create a st1 (Throughput Optimized HDD) volume for large file storage.
  4. Mount the st1 volume and upload a large log file to test throughput.
  5. Create an sc1 (Cold HDD) volume and attach it to a test instance.
  6. Compare CloudWatch metrics between gp3, st1, and sc1 volumes.
  7. Increase the size of a gp3 volume from 10 GiB to 20 GiB using the Console.
  8. Expand the filesystem inside Linux to use the resized volume.
  9. Modify volume type from gp2 to gp3 without downtime.
  10. Create an encrypted EBS volume with AWS-managed KMS key.
  11. Attach the encrypted volume to an instance and mount it.
  12. Copy files into the encrypted volume and verify encryption in the Console.
  13. Create a snapshot of an encrypted volume.
  14. Share an unencrypted snapshot with another AWS account.
  15. Enable cross-region copy of a snapshot.
  16. Enable cross-account copy of a snapshot.
  17. Configure tags for your EBS volumes to categorize them as dev, test, prod.
  18. Write a Linux script to back up /var/log to an EBS volume daily.
  19. Mount an EBS volume on /var/lib/mysql and store database files.
  20. Document cost comparison for gp3 vs gp2 vs io1 volumes.

Advanced Questions

  1. Create a volume from a snapshot, expand it, and restore a database backup into it.
  2. Configure an EC2 instance with multiple EBS volumes for /var/log and /home.
  3. Automate snapshot creation using AWS CLI and a cron job in Linux.
  4. Encrypt an existing unencrypted snapshot by copying it with encryption enabled.
  5. Create a script that monitors EBS usage and alerts when >80% full.
  6. Store Jenkins workspace data on a dedicated EBS volume and test persistence.
  7. Attach multiple EBS volumes to the same instance and configure RAID0 on Linux.
  8. Use CloudWatch to monitor IOPS and trigger an alarm if usage exceeds 3000.
  9. Backup and restore logs across regions using EBS snapshots.
  10. 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