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

by
Jeremy Canfield |
Updated: April 19 2023
| Amazon Web Services (AWS) articles
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