简体   繁体   English

如何将我的 AWS CLI 驱动器从 H 更改为 C

[英]How do I change my AWS CLI drive from H to C

I have AWS CLI V2 installed on my company laptop which is on Windows 10 Enterprise.我在 Windows 10 Enterprise 上的公司笔记本电脑上安装了 AWS CLI V2。

The AWSCLI is located at C:\Program Files\Amazon\AWSCLIV2 AWSCLI 位于C:\Program Files\Amazon\AWSCLIV2

When I enter aws configure it is saving my credentials in H:\ drive which is a network drive and I'm facing latency issues.当我输入aws configure时,它会将我的凭据保存在H:\驱动器中,这是一个网络驱动器,我正面临延迟问题。

How do I move my .aws to C:\ drive to avoid latency?如何将我的.aws移动到C:\驱动器以避免延迟?

According to the AWS documentation on https://docs.aws.amazon.com/credref/latest/refdocs/file-location.html#file-location-config the default location of the .aws directory is the home folder of the user.根据https://docs.aws.amazon.com/credref/latest/refdocs/file-location.html#file-location-config上的 AWS 文档, .aws目录的默认位置是用户的主文件夹.

You can override the exact location of the config and credentials files (which the aws configure call is writing) using the environment variables AWS_CONFIG_FILE and AWS_SHARED_CREDENTIALS_FILE , respectively.您可以分别使用环境变量AWS_CONFIG_FILEAWS_SHARED_CREDENTIALS_FILE覆盖configcredentials文件( aws configure调用正在写入)的确切位置。

Quote from the AWS documentation:引用 AWS 文档:

You can move the config file and the credentials file or even rename them as long as you tell the SDKs and tools how to find the information.只要您告诉 SDK 和工具如何查找信息,您就可以移动配置文件和凭证文件,甚至重命名它们。

To do this, set the following environment variables to point to the files containing the configuration or credentials information, according to the rules of your operating system:为此,请根据您的操作系统规则,将以下环境变量设置为指向包含配置或凭据信息的文件:

Config file – AWS_CONFIG_FILE配置文件 – AWS_CONFIG_FILE

Credentials file – AWS_SHARED_CREDENTIALS_FILE凭证文件 – AWS_SHARED_CREDENTIALS_FILE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM