Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

Interactively, I can use "aws configure" to change or see the default region. Is there a "pwd" like function, documented or not that allows me to determine or confirm the current region mid-script? Even if AWS_DEFAULT_REGION is not defined? I want a script to run under a number of profiles. I can scrape from aws configure list, but is there something neater?

1 Answer

0 votes
by (44.4k points)

aws configure get region will get you the current region at that point in your script.

If you are using a profile, then type aws configure get --profile $PROFILE_NAME

Do you want to master AWS, then do checkout the aws course training by Intellipaat.

Related questions

0 votes
1 answer
Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
2 answers

1.2k questions

2.7k answers

501 comments

693 users

Browse Categories

...