Bootstrap FreeKB - Amazon Web Services (AWS) - List Regions using the AWS CLI
Amazon Web Services (AWS) - List Regions using the AWS CLI


This assumes you have already configured the aws command line tool. If not, check out my article on Getting Started with the AWS CLI.

A region in a separate geographical location. For example, in the USA, there are 4 regions:

  • us-east-1
  • us-east-2
  • us-west-1
  • us-west-2

The aws ec2 describe-regions command can be used to list each AWS region. I've limited the output to only include the US regions, just to limit this example.

~]$ aws ec2 describe-regions
{
    "Regions": [
        {
            "Endpoint": "ec2.us-east-1.amazonaws.com",
            "RegionName": "us-east-1",
            "OptInStatus": "opt-in-not-required"
        },
        {
            "Endpoint": "ec2.us-east-2.amazonaws.com",
            "RegionName": "us-east-2",
            "OptInStatus": "opt-in-not-required"
        },
        {
            "Endpoint": "ec2.us-west-1.amazonaws.com",
            "RegionName": "us-west-1",
            "OptInStatus": "opt-in-not-required"
        },
        {
            "Endpoint": "ec2.us-west-2.amazonaws.com",
            "RegionName": "us-west-2",
            "OptInStatus": "opt-in-not-required"
        }
    ]
}

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 329ec5 in the box below so that we can be sure you are a human.