登入網站後到後台Service→CloudFront
到CloudFront Distributions介面中 按Create Distribution
切換到 AWS Cloudfront 頁面,可以看到支援 Web 跟 RTMP ,其中後者是 streaming media files。這邊是用Web部份
在Origin Domain Name 填入來源網址ex.hack.twgg.org
後面的選擇都保持預設 到最下方按Create Distribution
來源Domain請填入要轉發的域名
這邊請填入CNAME的名稱 之後要到自管的dns設置,之後按下最下面的Create Distribution
回到CloudFront底下會看到剛建立的顯示In Progress 等它狀態顯示Deployed就可以使用
記下這邊的xxxxx.cloudfront.net的網址
再到自管的域名設定新增剛才設定的CNAME
nslookup 檢查是否已設定完畢
先開啟cdn網頁測試是否正常 http://d31vvhrvz8ld10.cloudfront.net
測試cname的網頁 http://cdn.tonyhack.cloudns.pw