Mapping multiple subdomains to the same Amazon S3 bucket
I am aware of the procedure to map domains and su开发者_开发问答bdomains to S3 buckets, but my question is more related to DNS records. Can I have the static and cdn domains below pointing to the same bucket through some sort of indirect DNS record? In other words, can static and cdn both point to an S3 record which then points to Amazon S3? So when I update where things point to, I only need to update the DNS record pointing directly to S3.
- static.domain.com - points to my js,images,flash player, etc.
- cdn.domain.com - points to video files on Amazon S3
No that's not possible as the CNAMES are linked to the bucket name.
You can use multiple CNAMES with Amazon's Cloudfront cdn.
You can use the same bucket to host both the static content and content served via the CDN.
What you have to do is,
- Make a bucket named static.domain.com and point your domian CNAME record accordingly.
- Created a clouldFront distribution of the bucket and add a CDN as a CNAME for the distribution
- Point the CDN CNAME for the distribution accordingly.
This way, when you refer to your bucket though the static.domain.com your files will be served through s3, and when you refer through cdn.domain.com your content would be served though the CDN.
精彩评论