DEV Community

Cover image for How To List All Enabled Regions Within An AWS account
🚀 Vu Dao 🚀
🚀 Vu Dao 🚀

Posted on • Edited on

4

How To List All Enabled Regions Within An AWS account

Ref: describe-regions

If the Region is enabled by default, the output includes the following:

"OptInStatus": "opt-in-not-required"

If the Region is not enabled, the output includes the following:

"OptInStatus": "not-opted-in"

After an opt-in Region is enabled, the output includes the following:

"OptInStatus": "opted-in"

Pre-required:

  1. AWS CLI
  2. jq JSON Alt Text

Run



aws ec2 describe-regions --all-regions | jq -r '.Regions | .[] | .RegionName + " " + .OptInStatus'  | grep -v not-opted-in | cut -d' ' -f1
eu-north-1                     
ap-south-1                       
eu-west-3                    
eu-west-2      
eu-west-1             
ap-northeast-2           
me-south-1        
ap-northeast-1                                     
sa-east-1                                             
ca-central-1                                 
ap-east-1                                                                                                                                    
ap-southeast-1                          
ap-southeast-2                                 
eu-central-1                               
us-east-1       
us-east-2    
us-west-1    
us-west-2


Enter fullscreen mode Exit fullscreen mode

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

Try REST API Generation for Snowflake

DevOps for Private APIs. Automate the building, securing, and documenting of internal/private REST APIs with built-in enterprise security on bare-metal, VMs, or containers.

  • Auto-generated live APIs mapped from Snowflake database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay