Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29417

How to list down all the AMI image IDs for Red Hat in AWS using boto3?

$
0
0

I'm working on a task where I need to validate if a user has created an EC2 instance with RHEL latest image using Cloudtrail logs for that user.

I was able to find the AMI image IDs used by that user using boto3.

I want to check whether the AMI image ID used by the user is present in the list of image IDs provided by RHEL.

How do I list down all the AMI image IDs for RedHat Inc.

I have gone through the boto3 documentation describe_images()

There's a param Owners in it. But not sure what should I pass in there to get all the image IDs for Redhat.

PS: Found that Redhat owner ID is - 309956199498 and we can query with it using ec2.describe_images()


Viewing all articles
Browse latest Browse all 29417