首页 > 代码库 > How to use aws CloudFront for CDN

How to use aws CloudFront for CDN

How to use aws CloudFront for CDN

1. create a new distribution in AWS cloudfront service, select alternative domain names

技术分享

 

2. create a new subdomain, and point the new subdomain CNAME to the xxxxxxxx.cloundfront.net you just got from the service.

 

3. Do the original setting for, tell the service where it can get content, the original website can in EC2 or just any website that out side of aws.

技术分享

4. Setting cache Behaviors, tell the service what kind of objects can be cached, what kind of things need forward to the original server get the content.

技术分享

 

5. For each behavior, do the related settings.

技术分享

6. For the default behavior, do the related settings.

技术分享

 

7. Wait few minutes,  when the status changed to Deployed, then the clound front is working.

技术分享

 

How to use aws CloudFront for CDN