Wiring up an Amazon S3 bucket to a CNAME entry - The specified bucket does not exist
The mapping was something like this:
our-subdomain.somedomain.com -> static-site.s3-website-eu-west-1.amazonaws.com
When we tried to access the site through our-subdomain.somedomain.com we got the following error:
<Error> <Code>NoSuchBucket</Code> <Message>The specified bucket does not exist</Message> <BucketName></BucketName> <RequestId></RequestId> <HostId>
A bit of googling led us to this thread which suggested that we needed to ensure that our bucket was named after the sub domain that we wanted to serve the site from.
In this case we needed to rename our bucket to 'our-subdomain.somedomain.com" and then our CNAME entry to:
our-subdomain.somedomain.com -> our-subdomain.somedomain.com.s3-website-eu-west-1.amazonaws.com
And then everything was happy.