When the AWS EC2 instance was created

When the AWS EC2 instance was created

Here is how to check when an EC2 instance was created:

Option 1. Check the Volume attachment time

image - When the AWS EC2 instance was created

Option 2. Using a Python script

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")
whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.