I want to host my images on Amazon S3. So I created a bucket by the name images.foo.com
and added a CNAME entry with the record host as images.foo.com
and a record answer as s3.amazonaws.com
.
There is a file in the bucket named image.jpg, under a folder named images. which I can access at images.foo.com.s3.amazonaws.com/images/image.jpg
I cant access the same from images.foo.com/images/image.jpg
I also changed the record answer to s3.amazonaws.com/images.foo.com/
, but that also doesnt work. What am I missing?
Thanks.
EDIT, AFTER THE ANSWER: Just read these pages:
http://carltonbale.com/how-to-alias-a-domain-name-or-sub-domain-to-amazon-s3
http://www.wrichards.com/blog/2009/02/customize-your-amazon-s3-url/comment-page-1/#comment-135
Point your
images.foo.com
CNAME atimages.foo.com.s3.amazonaws.com
, the full name you want it to be an alias for. (Think 'CNAME == symlink'.)Your first try just points to
s3.amazonaws.com
, which isn't what you want, and the second makes no sense, since slashes aren't valid in domain names (and also you have the parts backwards).