[英]AWS CLI not reading config file
我已经设置了CLI,以便[default]
用于我的工作帐户, [jacoblambert]
是我的个人帐户。 当我尝试使用以下命令访问S3
:
aws --profile jacoblambert s3 ls
我遇到以下错误:
A client error (InvalidRequest) occurred when calling the GetBucketLocation operation:
You are attempting to operate on a bucket in a region that requires Signature Version 4.
You can fix this issue by explicitly providing the correct region location using the --region argument,
the AWS_DEFAULT_REGION environment variable,
or the region variable in the AWS CLI configuration file.
但事实是,在AWS CLI配置文件中设置了region
变量(我拉出了密钥):
~ $ aws configure list --profile jacoblambert
Name Value Type Location
---- ----- ---- --------
profile jacoblambert manual --profile
region us-east-2 config-file ~/.aws/config
如果我在aws s3
命令中指定--region us-east-2
,仍然会遇到相同的错误。
该问题是由我的CLI过时引起的。
您确定是由于out of date
找到了根本原因吗?
您报告的问题与Amazon S3签名版本4身份验证特定策略密钥有关
您应该可以使用以下命令进行修复
aws configure set profile.jacoblambert.s3.signature_version s3v4
或在〜/ .aws / config中将以下行添加到该配置文件[jacoblambert]
s3 =
signature_version = s3v4
参考:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.