Which AMI was my EC2 instance created from?
Is there any way to tell which AMI my EC2 instance was created from?


Short answer: yes.

Longer answer: yes - how would you like to get it?

The AMI which the EC2 instance was launched with is part of the EC2 instance metadata

Every instance publishes its metadata, which you can retrieve via the HTTP interface:

curl http://&lt;instance.ip.address&gt;/latest/meta-data/ami-id


(lifted directly from the AWS docs)

Many people prefer the Python library for the AWS API (boto3). In this particular case you would need to use the instance.image_id method.