list-ec2-volumes

This command lists all EC2 block volumes associated with your EC2 accounts,
including their sizes and the systems they are attached to,
if any.
By default it includes those from all accounts,
but you can limit the display to just one with the optional --account flag (followed by an account number).

To switch to a more parsable and detailed output format,
add the --multiline flag to the command line.
To just get a list of volume IDs,
use the --name-only flag.