简体   繁体   中英

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.

I'm an unsure if this cloudfront domain name will ever change? (IE when enabling/disabling it, attaching/reattaching etc.

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). 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.

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).

For even greater control, you also have the option of mapping your own domain name to a distribution using a CNAME record :

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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