gpt4 book ai didi

amazon-s3 - AWS S3 CLI :An error occurred (AllAccessDisabled) when calling the PutObject operation: All access to this object has been disabled

转载 作者:行者123 更新时间:2023-12-04 23:36:55 42 4
gpt4 key购买 nike

我正在使用aws-cli/1.15.25 Python/2.7.15 Darwin/17.7.0 botocore/1.10.25尝试使用以下命令将文件上传到S3:

aws s3 cp <file> s3://bucket.s3.amazonaws.com/<bucket name>

但我得到以下返回:

ü
pload failed: ./<file> to s3://bucket.s3.amazonaws.com/<bucket name> An error occurred (AllAccessDisabled) when calling the PutObject operation: All access to this object has been disabled

作为测试,我使用以下策略将我的存储桶设置为所有人都可以访问:
{
"Version": "2012-10-17",
"Statement": [
{
"Principal": "*",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:PutObjectAcl",
"s3:GetObjectAcl"
],
"Resource": [
"arn:aws:s3:::<bucket name>/*"
]
}
]
}

我的IAM用户具有正确的权限集

我不知道还要看什么。我已经Google搜索并尝试了大多数建议

最佳答案

您在网址中两次指定了存储桶名称,或者实际上是在使用字符串“bucket”。

您可以将虚拟托管样式用作:

http://bucketname.s3.amazonaws.com/path/to/file

http://bucketname.s3-aws-region.amazonaws.com/path/to/file

或路径样式网址:

http://s3.amazonaws.com/bucketnamepath/to/file

http://s3-aws-region.amazonaws.com/bucketname/path/to/file

用该区域替换“aws-region”。对于不是us-east-1的区域,请使用“s3-aws-region”样式。南美地区的水桶示例:

http://bucketname.s3-sa-east-1.amazonaws.com/path/to/file

http://s3-sa-east-1.amazonaws.com/bucketname/path/to/file

关于amazon-s3 - AWS S3 CLI :An error occurred (AllAccessDisabled) when calling the PutObject operation: All access to this object has been disabled,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51405858/

42 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com