Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to see how I can get a list of regions from AWS on the command line so I can quickly look things up, how can I do this?

share|improve this question
up vote 7 down vote accepted

You can do this by running the command ec2-describe-regions from the command line (if you have ec2-api-tools installed available in multiverse).

$ ec2-describe-regions
REGION  eu-west-1
REGION  sa-east-1
REGION  us-east-1
REGION  ap-northeast-1
REGION  us-west-2
REGION  us-west-1
REGION  ap-southeast-1
share|improve this answer
Yeah, about that. You need a default region configured before this will work (3 years later, still ?). So google is your friend. Regions and endpoints (rande - nmemonically randy) here Why they could not just default to us-east-1 when this is attempted before configuration is beyond me ? – mckenzm Jan 1 at 0:40

This is now how you'd do it using the aws cli:

$ aws ec2 describe-regions --output table
|                     DescribeRegions                    |
||                        Regions                       ||
||             Endpoint              |   RegionName     ||
||      |  eu-west-1       ||
|| |  ap-southeast-1  ||
|| |  ap-southeast-2  ||
||   |  eu-central-1    ||
|| |  ap-northeast-2  ||
|| |  ap-northeast-1  ||
||      |  us-east-1       ||
||      |  sa-east-1       ||
||      |  us-west-1       ||
||      |  us-west-2       ||
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.