List volumes without a tag

 for region_name in `aws ec2 describe-regions  --query "Regions[].{Name:RegionName}" --output text` ;
do echo "Checking the region" $region_name;
        aws ec2 describe-volumes --filters Name=status,Values=available  --query "Volumes[*].{ID:VolumeId,VolumeState:State}"  --query 'Volumes[?!not_null(Tags[])]' --region $region_name --output table;
done;

Comments

Popular posts from this blog

Logical volume vmxxxx_img is used by another device - Error on LVM removal

Open VZ cheat Sheet

Cheat sheet for Hardware RAID health check - Megaraid, Adaptec, 3wareraid and HPraid.