In this recipe, we started by creating a volume. Volumes are created from snapshots. If you don't specify a snapshot ID, it uses a blank snapshot, and you get a blank volume.
While volumes are hosted redundantly, they are only hosted in a single AZ, so they must be provisioned in the same AZ the instance is running in. The data on a volume is stored in several places in the AZ to ensure a high level of durability, but they are only made available in a single AZ to ensure consistent low latency performance.
The create-volume command returns a response that includes the newly created volume's VolumeId. We then use this ID in the next step.
In step 2, we attached a volume to the instance. When attaching to an instance, you must specify the name of the device that it will be presented to the operating system with. Unfortunately, this doesn't guarantee what the device will appear as. In the case of AWS Linux, /dev/sdf becomes /dev/xvdf.