0

I am trying to see if anyone knows how to identify the creation date for Amazon Machine Image(s)?

I have looked all through the documentation on the AWS site, and do not see anything.

The only thing I am thinking is to take the ebs volume snapshot start/end time and use that for my AMI creation date-not sure if that is a "good" method or not.

1

In one line using the ec2 API tools you can do it like this:

ec2-describe-snapshots `ec2-describe-images ami-xxxxxxxx | grep snap | awk '{print $4}'` | head -1 | awk '{print $5}'
0

Going with the 1 liner approach as well.. here's one using the amazon provided aws cli tools:

aws ec2 describe-snapshots --snapshot-ids=`aws ec2 describe-images --image-ids="ami-xxxxxx" | grep snap | awk -F '"' '{print $4}'` | grep StartTime | awk -F'"' '{print $4}'

you may need to add -"-region=some-aws-region-1" to specify where you're searching if you don't have it defaulted in your configs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.