AWS ANS に向けての勉強　3. Cloud Front

### 参考
- https://www.slideshare.net/AmazonWebServicesJapan/20190730-aws-black-belt-online-seminar-amazon-cloudfront

# 概要
- マネージドなCDNサービス
- AWS のエッジロケーションから提供されるEdge SErvice

# ユースケース
https://docs.aws.amazon.com/ja_jp/AmazonCloudFront/latest/DeveloperGuide/IntroductionUseCases.html
- 静的ウェブサイトのコンテンツ配信の加速
- オンデマンドビデオおよびライブストリーミングビデオの配信
- システム処理全体で特定のフィールドを暗号化する
- エッジのカスタマイズ
- Lambda@Edge カスタマイズを使用したプライベートコンテンツの供給

# 特徴
- 高性能な分散配信
- 高いパフォーマンス
- キャパシティアクセスからの解放
- ビルトインのセキュリティ機能
- 設定が容易で即時利用可能
- 充実したレポーティング
- 完全重量課金

# CloudFrontによるCDN
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-14-638.jpg?cb=1564470717)

# 最適なエッジロケーションの割り当て
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-15-638.jpg?cb=1564470717)

# リージョナルエッジキャッシュ
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-19-638.jpg?cb=1564470717)

# コンテンツ配信設定の流れ
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-22-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-23-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-24-638.jpg?cb=1564470717)

# gzip圧縮機能
- S3は対応していないのでこちらを使う
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-25-638.jpg?cb=1564470717)

# キャッシュ
## キャッシュコントロール機能
- GET / HEAD / OPTIONのリクエストが対象
- 単一ファイルサイズのキャッシングは最大20GBまで
- URLパスごとにキャッシュ期間設定が可能
- フォワードオプション機能による動的ページ
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-26-638.jpg?cb=1564470717)

## キャッシュコントロールヘッダ
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-27-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-28-638.jpg?cb=1564470717)

## キャッシュファイルの無効化
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-29-638.jpg?cb=1564470717)

## 動的コンテンツ機能
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-30-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-31-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-32-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-33-638.jpg?cb=1564470717)

## きめ細やかなキャッシング
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-34-638.jpg?cb=1564470717)

## カスタムエラーページ
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-35-638.jpg?cb=1564470717)

## カスタムオリジンのタイムアウト
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-36-638.jpg?cb=1564470717)

## オリジンフェイルオーバー
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-37-638.jpg?cb=1564470717)

# データ保護機能
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-39-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-40-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-41-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-42-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-43-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-44-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-45-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-46-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-47-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-48-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-49-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-50-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-51-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-52-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-53-638.jpg?cb=1564470717)

# レポート ＆　ロギング機能
## CloudFront Report
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-55-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-56-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-57-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-58-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-59-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-60-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-61-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-62-638.jpg?cb=1564470717)

## アクセスログ
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-63-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-64-638.jpg?cb=1564470717)
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-65-638.jpg?cb=1564470717)

# TIPS
## DNS 名前解決の高速化
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-67-638.jpg?cb=1564470717)

## リアルタイム障害・異常検知
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-68-638.jpg?cb=1564470717)

## S3 オリジン自動キャッシュの無効化
![](https://image.slidesharecdn.com/20190730aws-blackbeltamazoncloudfront-190730054027/95/20190730-aws-black-belt-online-seminar-amazon-cloudfront-69-638.jpg?cb=1564470717)