List All AWS Regions With AWS CLI

With ever-growing AWS regions and data centres, it very handy to use the AWS CLI command-line to list all the available regions.

Before we start, you will need AWS CLI installed and configured with a credential file or aws configure command.

List Regions

To list all the AWS regions in a table output, use the following command.

aws ec2 describe-regions  --output table

You could also use the following command to list all the regions only in a list format.

aws ec2 describe-regions \
    --all-regions \
    --query "Regions[].{Name:RegionName}" \
    --output text

Published
Categorized as AWS

Leave a comment

Your email address will not be published. Required fields are marked *