Shabbir Bata
Shabbir Bata

Reputation: 971

How to find information about all the AMI

I use this to display information about the particular AMI:

aws ec2 describe-images --image-ids "ami-xxxxxxxx"

And it gives me information about the image.

What if there are multiple AMI, is there a way I can get information about all the AMI and store them in a file? Is this possible, or is there another better way?

Upvotes: 0

Views: 751

Answers (2)

sudo
sudo

Reputation: 2327

You may try this: aws ec2 describe-images --filters file://images.json

Where images.json contains:

[ { "Name":"image-id", "Values": ["aki-xxx","aki-xxx"] } ]

Upvotes: 1

Shashi Bhushan
Shashi Bhushan

Reputation: 690

You can list all your AMI's using filters along with your code you mentioned. Try this:

aws ec2 describe-images --region <Your-specific-region>
--filter "Name=is-public,Values=false" --filter 
"Name=architecture, Values=x86_64" --filter 
"Name=owner,Values=xxxx"

Use owner as the owner of AMI's to filter out. And then you can save the output in a file.

Hope it will help !

Upvotes: 0

Related Questions