top of page

Quick AWS Region change

Updated: Jul 10

Happens very often that you have to manage an account with Console control. But when your infrastructure is multi region, you need to change the AWS_REGION environmental variable constantly and it is very easy to confuse their names because they don't change much, do they? Well, here you have a Teratip to make a descriptive variable change:


Copy and paste the following function into your .bashrc file.

""
function region(){
                      export AWS_REGION=$(dialog --stdout --menu "AWS Region" 15 70 8 \
                                              us-east-1 Virginia \
                                              us-east-2 Ohio \
                                              us-west-1 California \
                                              us-west-2 Oregon 
                       );
}


You might need to install dialog to make it work. At the moment it is available for Linux and Mac users only. But perhaps you can find alternatives for Windows as well. The most important subject is the concept so you can adapt it to your daily basis.


Then log in to a new console and type region to choose it. Feel free to modify it with the regions you actually use in your deployment. Come back later for more Teratips about Linux/Mac Console.




""



Juan Eduardo Castaño

DevOps Engineer

Teracloud




Buscar por tags
bottom of page