How to list all running EC2 spot instances

You can use one of the below commands to list all running spot instances.

aws ec2 describe-instances --filters "Name=instance-lifecycle,Values=spot"
aws ec2 describe-spot-instance-requests --query "SpotInstanceRequests[*].{ID:InstanceId}"

See also  How to encrypt an EBS volume