#
ドキュメント

Document

自分のための備忘録です。

CloudFront を ローカルの hosts ファイルで確認

  1. IP を知りたい有効なディストリビューションドメイン名を取得CloudFront___Global CloudFront___Global
  2. ディストリビューションドメイン名の IP を dig で調べる
  3. /etc/hosts ファイルに ↑でしらべた IP と ディストリビューションのカスタムドメイン名を記録
dig +noedns xxxxxxxxxx.cloudfront.net

; <<>> DiG 9.10.6 <<>> +noedns d21eycyficcg6s.cloudfront.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29672
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;xxxxxxxxxx.cloudfront.net. IN      A

;; ANSWER SECTION:
xxxxxxxxxx.cloudfront.net. 60 IN    A       18.65.185.20
xxxxxxxxxx.cloudfront.net. 60 IN    A       18.65.185.64
xxxxxxxxxx.cloudfront.net. 60 IN    A       18.65.185.81
xxxxxxxxxx.cloudfront.net. 60 IN    A       18.65.185.97

/etc/hosts

.....
# cloudfront
18.65.185.20 example.com
.....