Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

Is there a way to find out Amazon EC2 AMI creation date/time from AWS Console or command line?

Note: I am not looking for instance creation, rather when was a particular AMI created?

1 Answer

0 votes
by (44.4k points)

You can use the describe-images for getting it. Use this:

CreationDate -> (string)

The date and time the image was created and for more information and explanation check out this documentation -

Sample describe-tags command:

aws ec2 describe-images --filters "Name=tag:Custom,Values=Linux1" --query 'Images[*].{ID:ImageId}'

If not, you can use this python code snippet to get it:

import boto3

ec2 = boto3.resource('ec2', region_name='instance_region_name')

volume = ec2.Volume('vol-id')

print volume.create_time.strftime("%Y-%m-%d %H:%M:%S")

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
asked Jul 8, 2019 in AWS by Amyra (12.9k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

29.3k questions

30.6k answers


104k users

Browse Categories