Boto3: Get EC2 images owned by me


I would like to get all ami images owned by me. I tried something like below:

But I need to put owner_id explicid in the code. Is it any solution to do that automatically from aws credentials?


You should be able to use self for the owner. This is what I use.

Leave a Reply