AW3 CLI command to get list of all region names


AW3 CLI command to get list of all region names

Knowing the region names might be something that you should know as the back of your hand if you are using AWS a lot, it is easy to see them when you are using the AWS Console, but if you are using the AWS CLI it could be something that you would like to see by running a command,

% aws ec2 describe-regions --output text

REGIONS ec2.eu-north-1.amazonaws.com    opt-in-not-required     eu-north-1
REGIONS ec2.ap-south-1.amazonaws.com    opt-in-not-required     ap-south-1
REGIONS ec2.eu-west-3.amazonaws.com     opt-in-not-required     eu-west-3
REGIONS ec2.eu-west-2.amazonaws.com     opt-in-not-required     eu-west-2
REGIONS ec2.eu-west-1.amazonaws.com     opt-in-not-required     eu-west-1
REGIONS ec2.ap-northeast-3.amazonaws.com        opt-in-not-required     ap-northeast-3
REGIONS ec2.ap-northeast-2.amazonaws.com        opt-in-not-required     ap-northeast-2
REGIONS ec2.ap-northeast-1.amazonaws.com        opt-in-not-required     ap-northeast-1
REGIONS ec2.sa-east-1.amazonaws.com     opt-in-not-required     sa-east-1
REGIONS ec2.ca-central-1.amazonaws.com  opt-in-not-required     ca-central-1
REGIONS ec2.ap-southeast-1.amazonaws.com        opt-in-not-required     ap-southeast-1
REGIONS ec2.ap-southeast-2.amazonaws.com        opt-in-not-required     ap-southeast-2
REGIONS ec2.eu-central-1.amazonaws.com  opt-in-not-required     eu-central-1
REGIONS ec2.us-east-1.amazonaws.com     opt-in-not-required     us-east-1
REGIONS ec2.us-east-2.amazonaws.com     opt-in-not-required     us-east-2
REGIONS ec2.us-west-1.amazonaws.com     opt-in-not-required     us-west-1
REGIONS ec2.us-west-2.amazonaws.com     opt-in-not-required     us-west-2

You can also make use go grep along with it you filter out what you are looking for, for example,

$ aws ec2 describe-regions --output text | grep us-
REGIONS	ec2.us-east-1.amazonaws.com	opt-in-not-required	us-east-1
REGIONS	ec2.us-east-2.amazonaws.com	opt-in-not-required	us-east-2
REGIONS	ec2.us-west-1.amazonaws.com	opt-in-not-required	us-west-1
REGIONS	ec2.us-west-2.amazonaws.com	opt-in-not-required	us-west-2
Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.