Amazon AWS CloudFront claims no such bucket exists

烂漫一生 提交于 2019-12-10 16:24:12

问题


I'm trying to set up CloudFront to serve images, but accessing it currently does not work and returns the error "The specified bucket does not exist."

<Error>
    <Code>NoSuchBucket</Code>
    <Message>The specified bucket does not exist</Message>
    <BucketName>someBucketName</BucketName>
    <RequestId>irrelevant</RequestId>
    <HostId>
        irrelevant
    </HostId>
</Error>

CloudFront requires you to use a domain to host rather than a url as the base. That domain is .s3.amazonaws.com, which is supposed to be equivalent to s3.amazonaws.com/bucketName.

That said, I'm able to access the content through the url:

https://s3.amazonaws.com/someBucketName/image.jpg

but not through

https://someBucketName.s3.amazonaws.com/image.jpg

which returns the same error. Any idea why this is happening? Is there something I need to do to make it the subdomain available? The same happens with https and http.


回答1:


The problem was that AWS does not like capital letters. Having a bucket with capital letters in it will not be accessible from the subdomain, because the casing is lost.



来源:https://stackoverflow.com/questions/19350957/amazon-aws-cloudfront-claims-no-such-bucket-exists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!