映射多个子域相同的S3桶 [英] Map multiple subdomains to same S3-bucket

查看:130
本文介绍了映射多个子域相同的S3桶的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一些方法来子域的多个(千)映射到一个S3桶? 如果是的话是不是也可以将其映射到特定的路径桶中为每个子域?

Is there some way to map multiple (thousands) of subdomains to one s3-bucket? If so is it also possible to map it to a specific path in the bucket for each subdomain?

我想test1.example.com映射到mybucket / TEST1和test2.example.com映射到mybucket / TEST2。

I want test1.example.com to map to mybucket/test1 and test2.example.com to map to mybucket/test2.

我知道最后一部分是不可能的,正常的DNS-记录,但也许有一些极好的路线53功能?

I know the last part isn't possible with normal dns-records but maybe there is some nifty Route 53 feature?

推荐答案

这是不可能的S3直接。您只能使用1子站点的S3桶。

It's not possible with S3 directly. You can only use 1 subdomain with an S3 bucket.

不过,你可以映射多个子域到<一个href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?CNAMEs.html">Cloudfront分布。

However you can map multiple subdomains to a Cloudfront distribution.

多CNAME别名

您可以使用一个以上的CNAME别名   同的分布。例如,   可以有 alias1.example.com 和    alias2.example.com 这两个相关联的   您的发行的域名。   最多可以有10个CNAME别名   每分布。您可以关联一个   特别是CNAME别名只有一个   分布。

You can use more than one CNAME alias with a distribution. For example, you could have alias1.example.com and alias2.example.com both associated with your distribution's domain name. You can have up to 10 CNAME aliases per distribution. You can associate a particular CNAME alias with only one distribution.

重要当增加一个额外的   CNAME别名到分布   已经有一个,确保包括   原来CNAME别名在    DistributionConfig 对象。除此以外,   您的更新将删除原来的CNAME   别名,只是增加了新的。本   是因为更新的过程中   分配的配置取代   整个配置对象;它   不将其添加新的项目。

Important When adding an additional CNAME alias to a distribution that already has one, make sure to include the original CNAME alias in the DistributionConfig object. Otherwise, your update erases the original CNAME alias and just adds the new one. This is because the process of updating a distribution's configuration replaces the entire configuration object; it doesn't add new items to it.

这篇关于映射多个子域相同的S3桶的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆