I would like to use a subdomain instead of the direct url to my s3 bucket at amazon.com. So instead of downloading images via an url like http://bucket-images.s3-eu-west-1.amazonaws.com/path/to/image.png
I would like to use http://assets.domain.com/path/to/image.png
. I tried setting a CNAME like this:
CNAME assets domain.com bucket-images.s3-eu-west-1.amazonaws.com
But after setting this CNAME I receive such error from amazon, when I visit the domain:
<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist</Message>
<BucketName>assets.domain.com</BucketName>
<RequestId>45646DFSDFSFASDF</RequestId>
<HostId>
dfasdcvcvd546456454ds5fasdf4ad5f64asdfasdfccdfgvggtg
</HostId>
</Error>
Over here they're telling to change the bucketname: https://forums.aws.amazon.com/message.jspa?messageID=237562 But that doesn't make sense. I worked on a project earlier, who used a bucketname totally different from the subdomain. So there has to be a way... Anyone who can help me out?