Search code examples
rubyruby-on-rails-3amazon-web-servicesamazon-ami

How to find the region of AMI?


In my Project I have one AMI Image-id. I want find out in which region this AMI runs? Can anyone please explain, how to get it without going to AWS console.


Solution

  • use AWS ec2 describe images function http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-DescribeImages.html

    using the AWS command line tools.

    alternatively you can use Ruby sdk for AWS

    http://aws.amazon.com/sdkforruby/