How can I get a list of encrypted disks for instances that are running on the AWS CLI?

HOW TO -️ October 18, 2021

There is a great question here about how to get a list of encrypted disks. I'm currently using the describe-volumes command.

For the record I'm currently using:

ERROR Rendering Code Block

What I want is to filter that down further to just the instances that are running. (ie exclude the ones that are stopped).

My question is: How can I get a list of encrypted disks for instances that are running on the AWS CLI?

Answer

Did you try something from the aws cli docs? Mabye from aws ec2 describe-instances? ...maybe integrate some munged output from a separate inline run of $(aws ec2 describe-instances ...) into this command? Could you expand on how you'd do that?

Initializing...