How can I get list of only running instances when using ec2-describe-tags
. I am using my command like this:
ec2-describe-tags --filter "resource-type=instance" --filter "value=somevalue" --filter "key=key"
It is easy using the aws-cli:
aws ec2 describe-instances --query 'Reservations[*].Instances[*].[InstanceId]' --filters Name=instance-state-name,Values=running --output text