问题描述
访问的Bucket不存在。
问题原因
采用S3接口兼容模式调用PutBucketAcl接口时,如果访问的Bucket不存在,则报此错误。
问题示例
如下示例中Bucket不存在,则会报此错误:
PUT /?acl HTTP/1.1
Host: bucket-not-exist.oss-cn-hangzhou.aliyuncs.com
x-amz-acl: ACL
Content-MD5: ContentMD5
x-amz-sdk-checksum-algorithm: ChecksumAlgorithm
x-amz-grant-full-control: GrantFullControl
x-amz-grant-read: GrantRead
x-amz-grant-read-acp: GrantReadACP
x-amz-grant-write: GrantWrite
x-amz-grant-write-acp: GrantWriteACP
x-amz-expected-bucket-owner: ExpectedBucketOwner
<?xml version="1.0" encoding="UTF-8"?>
<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<AccessControlList>
<Grant>
<Grantee>
<DisplayName>string</DisplayName>
<EmailAddress>string</EmailAddress>
<ID>string</ID>
<xsi:type>string</xsi:type>
<URI>string</URI>
</Grantee>
<Permission>string</Permission>
</Grant>
</AccessControlList>
<Owner>
<DisplayName>string</DisplayName>
<ID>string</ID>
</Owner>
</AccessControlPolicy>
解决方案
请检查Bucket名称,是否拼写错误。如果确认没有拼写错误,则需要先在创建好Bucket后再调用此接口。
文档内容是否对您有帮助?