Find ami creation date ?

 for region_name in `aws ec2 describe-regions  --query "Regions[].{Name:RegionName}" --output text` ;
do echo "Checking the region" $region_name;
 echo "Checking the region" $region_name >> $region_name.txt
    aws ec2 describe-images --region $region_name --owners self --query 'sort_by (Images, &CreationDate)[].{Name: Name, Image: ImageId , CreationDate: CreationDate}[]' --output text |  sed -E 's/\s+/,/g' >> $region_name.txt
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.