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 個月前
相關內容
- 已提問 6 個月前
- AWS 官方已更新 1 年前
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