2개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
1
Based on a quick check of my own environment, I think CloudShell sets the AWS_DEFAULT_REGION
environment variable, which will override a value in a configuration file (as written by aws configure
).
You can check where it's getting the value for the region from with aws configure list
. If it's the environment variable, you can override it with export AWS_DEFAULT_REGION=...
, or clear it (so it should use the config file) with unset AWS_DEFAULT_REGION
.
0
aws configure list
is an interesting detail. It showed that it takes the value from AWS_REGION, I did not know that variable exists. Thank you!
답변함 3달 전
Yeah, I think AWS_DEFAULT_REGION is now historical - and maybe for only some of the clients, and AWS_REGION is more "standard". There's some interesting docs on all the variables (as well as other settings) at https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html#EVarSettings