EBS Volumes and Snapshots

The disk is an EBS 24 volume: network storage in the instance's AZ that survives stops and can be detached and moved. describe-volumes reported this one as gp3, 8 GiB, 3,000 IOPS, 125 MB/s, attached as /dev/sda1 with DeleteOnTermination true. At USD 0.08 per GB-month in us-east-1 it costs USD 0.64 a month, running or stopped. Inside, it appears as NVMe device nvme0n1, with 3.7 GB of 6.8 GB used after the LAMP install. A data volume you add yourself defaults to DeleteOnTermination false and bills until deleted (Cost Traps).

A snapshot is an incremental block-level copy, stored regionally, that restores into a new volume in any AZ or copies to another Region. Snapshots were outside what the account used for this chapter could create, so these commands have no output:

Snapshotting a volume, then growing it without downtimeShell
aws ec2 create-snapshot --volume-id vol-0a1cca698594c83f4 --description "before upgrade"
aws ec2 modify-volume --volume-id vol-0a1cca698594c83f4 --size 16
sudo growpart /dev/nvme0n1 1 && sudo resize2fs /dev/nvme0n1p1   # on the instance, afterward

A snapshot of a running MySQL 524 server is only crash-consistent, so dump the database first (MySQL).