aws ec2 get-image-ancestry
Retrieves the ancestry chain of the specified AMI, tracing its lineage back to the root AMI. AWS CLI reference
2 options Its page in the AWS CLI reference
Options
--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--image-idThe ID of the AMI whose ancestry you want to trace.