Question

I have been using fog for one of my project,i have used describe_images with filter parameters, but now i am getting only the windows images, so is there any way to get the other AMIs with changing the parameter(platform)?. lets an example 'platform => linux' something like that

spec_images = @conn.describe_images('Owner' => 'amazon','platform' => 'windows')
my_images = spec_images.body["imagesSet"]

#  List image ID, architecture and location
for key in 0...my_images.length
  print my_images[key]["imageId"], "\t" , my_images[key]["architecture"] , "\t\t" ,     
my_images[key]["imageLocation"],  "\n";
end 
Was it helpful?

Solution

According to the API documentation for the DescribeInstances call...

Use windows if you have Windows based instances; otherwise, leave blank.

So "windows" is the only valid value for that filter, presently, and according to the AWS developer forums, there isn't currently a way to filter for non-Windows instances:

It appears there is no way currently to filter for linux instances using ec2-describe-instances. This is expected behavior and no easy workaround at this time. We will be updating our documentation to reflect this. I apologize for the inconvenience.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top