简体   繁体   English

亚马逊云端域名是否会发生变化?

[英]Does the Amazon cloudfront domain name ever change?

I've setup a cloudfront distribution pointing to my EC2 instance (web server), tucked inside a ELB. 我已经设置了一个指向我的EC2实例(Web服务器)的cloudfront发行版,它隐藏在ELB中。

I'm an unsure if this cloudfront domain name will ever change? 我不确定这个云端域名是否会改变? (IE when enabling/disabling it, attaching/reattaching etc. (IE启用/禁用它,附加/重新连接等)

So long as the distribution still exists, it will use the same domain on cloudfront (the one assigned to you at the distribution's creation time). 只要分发仍然存在,它将在cloudfront上使用相同的域(在分发的创建时分配给您的域)。 This cloudfront domain will only be lost when a distribution is deleted: 只有在删除分发时,此云端域才会丢失:

A disabled distribution is no longer functional and you will no longer be charged, but it can be enabled again at any time. 已禁用的分发功能不再有效,您将不再收费,但可以随时再次启用。 A deleted distribution is no longer accessible and is lost forever. 删除的分发不再可访问,并且永远丢失。

If you want to preserve the assigned cloudfront domain but temporarily disable access to it, use the AWS console to disable it - not delete it. 如果要保留指定的cloudfront域但暂时禁用对其的访问权限,请使用AWS控制台禁用它 - 而不是删除它。

The only reason I've had to delete distributions is for general cleanup of old ones, or when I've been close to their limit of 100 distributions per account (which has only happened once to me). 我必须删除发行版的唯一原因是对旧版本进行一般性清理,或者当我接近每个帐户100个发行版的限制时(这对我来说只发生过一次)。

For even greater control, you also have the option of mapping your own domain name to a distribution using a CNAME record : 为了获得更好的控制,您还可以选择使用CNAME记录将自己的域名映射到分发

In CloudFront, an alternate domain name, also known as a CNAME, lets you use your own domain name (for example, www.example.com) for links to your objects instead of using the domain name that CloudFront assigns to your distribution. 在CloudFront中,备用域名(也称为CNAME)允许您使用自己的域名(例如,www.example.com)来链接到对象,而不是使用CloudFront分配给您的分配的域名。

The above is the approach I use because I like more control over resources, but depending on your use case it might be overkill since the original distribution name won't change unless you delete it. 以上是我使用的方法,因为我喜欢对资源的更多控制,但是根据您的用例,它可能是过度的,因为除非您删除它,否则原始分发名称不会更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM