Servisphere
Amazon CloudFront のアイコン(AWS Architecture Icons)

Amazon CloudFront

CDN・エッジキャッシュ

コンテンツ配信ネットワークです。ユーザーに近い数百のエッジ拠点(edge)でファイルや API をキャッシュし、遅延を減らします。

  • コスト$ 安い
  • 難易度●●●●●
  • 未使用でも課金?いいえ
  • AWS マネージド
  • 出題試験CLF · SAA · DVA

範囲: Global(数百のエッジ拠点)

CloudFront をマップで開く →
たとえるならお客様を本社倉庫まで来させる代わりに、各地区に支店を開くようなものです。

CloudFront はシステムのどこにある?

マップで全体を見る →

具体例でステップごとに

  1. オンライン講座のサイトはシンガポールにサーバーがあり、日本や米国のユーザーはページの表示が遅いと感じています。
  2. CloudFront ディストリビューションを作成し、画像と動画は S3 バケットから、動的なページは ALB から取得するようにします。
  3. 東京のユーザーが初めてページを開くと、CloudFront はシンガポールからファイルを取得し、東京近くのエッジロケーションに保持します。
  4. 後から東京でアクセスした人は、そのエッジから直接ファイルを受け取るのでずっと速く、オリジンサーバーの負荷も減ります。
  5. 有料動画は署名付き URL で保護し、S3 バケットは非公開のまま、オリジンアクセスコントロールで CloudFront だけが読めるようにします。

▶ シナリオ「3 層 Web(従来型)」をマップで見る

いつ使う?

✓ 使うべき場面

さまざまな場所にユーザーがいる Web サイト、動画、API。

✗ 避けるべき場面

HTTP 以外のプロトコルを高速化したい → Global Accelerator。

よくある使い方

  • 世界中のユーザー向けに Web サイト/アプリケーションを高速化
  • 動画配信、大容量ファイルのダウンロード
  • S3 の前段に置いて bucket を隠し(OAC)、データ転送料金を削減
  • エッジでロジックを実行(CloudFront Functions、Lambda@Edge)

CloudFront・S3・ELB の違い

CloudFrontS3ELB
役割世界中にコンテンツをキャッシュして配信ファイルを保存1 つのリージョン内でトラフィックを分散
独自ドメインでの HTTPS可能(us-east-1 の ACM 証明書)ウェブサイトエンドポイントは HTTP のみ可能(同じリージョンの ACM 証明書)
ユーザーとの距離世界中の数百のエッジロケーション1 つのリージョン1 つのリージョン
よく組み合わせるものS3、ALB、WAF、Lambda@EdgeCloudFrontAuto Scaling、CloudFront

料金はいくら?

料金の例月 500 GB の Web サイト → 無料の 1 TB 以内で、ほぼ $0。
  • 課金方式: ユーザーへの転送 GB 単位(北米/ヨーロッパで約 $0.085/GB、地域により異なる)+ HTTPS request 数(約 $0.01/10,000)。AWS の origin から CloudFront へのデータは無料です。
  • 無料枠: Always Free: 毎月データ転送 1 TB + 1,000 万 request。
⚠️ 料金の落とし穴

キャッシュヒット率が低い(cache key が細かすぎる)と origin に負荷が集中する。ユーザーが主に 1 つの地域にいるのに Price Class「All」を選ぶ。

料金は us-east-1 の参考値(2026年10月14日 更新)で、変更されている可能性があります。必ず AWS の料金ページでご確認ください。 AWS 公式の料金ページ ↗

💡 試験のコツ

S3 を CloudFront 経由でしか読ませないならオリジンアクセスコントロール + バケットポリシー、有料コンテンツなら署名付き URL か署名付き Cookie です。CloudFront 用の証明書は us-east-1 に作成します。HTTP 以外の TCP/UDP を高速化するなら Global Accelerator です。

本番の試験問題に挑戦

AWS 認定試験は英語でも受験できるため、問題文は英語のまま掲載しています。

1A company wants to configure its Amazon CloudFront distribution to use SSL/TLS certificates. The company does not want to use the default domain name for the distribution. Instead, the company wants to use a different domain name for the distribution. Which solution will deploy the certificate without incurring any additional costs?

  1. ARequest an Amazon issued private certificate from AWS Certificate Manager (ACM) in the us-east-1 Region.
  2. BRequest an Amazon issued private certificate from AWS Certificate Manager (ACM) in the us-west-1 Region.
  3. CRequest an Amazon issued public certificate from AWS Certificate Manager (ACM) in the us-east-1 Region.
  4. DRequest an Amazon issued public certificate from AWS Certificate Manager (ACM) in the us-west-1 Region.
答えを見る

正解: C

ACM のパブリック証明書は無料で、CloudFront は us-east-1 リージョンの証明書しか読み込みません。プライベート証明書(Private CA)は有料です。

2An ecommerce company wants to launch a one-deal-a-day website on AWS. Each day will feature exactly one product on sale for a period of 24 hours. The company wants to be able to handle millions of requests each hour with millisecond latency during peak hours. Which solution will meet these requirements with the LEAST operational overhead?

  1. AUse Amazon S3 to host the full website in different S3 buckets. Add Amazon CloudFront distributions. Set the S3 buckets as origins for the distributions. Store the order data in Amazon S3.
  2. BDeploy the full website on Amazon EC2 instances that run in Auto Scaling groups across multiple Availability Zones. Add an Application Load Balancer (ALB) to distribute the website traffic. Add another ALB for the backend APIs. Store the data in Amazon RDS for MySQL.
  3. CMigrate the full application to run in containers. Host the containers on Amazon Elastic Kubernetes Service (Amazon EKS). Use the Kubernetes Cluster Autoscaler to increase and decrease the number of pods to process bursts in traffic. Store the data in Amazon RDS for MySQL.
  4. DUse an Amazon S3 bucket to host the website's static content. Deploy an Amazon CloudFront distribution. Set the S3 bucket as the origin. Use Amazon API Gateway and AWS Lambda functions for the backend APIs. Store the data in Amazon DynamoDB.
答えを見る

正解: D

静的コンテンツは S3 + CloudFront、API は API Gateway + Lambda、データは DynamoDB。ミリ秒のレイテンシーで数百万リクエストまで拡張でき、運用するサーバーはありません。

Servisphere で 700 問以上を練習する →

よくある質問

CloudFront と S3 の静的ウェブサイトの違いは何ですか?

S3 の静的ウェブサイトは 1 つのリージョンから直接ファイルを配信し、ウェブサイトエンドポイントは HTTP のみ対応です。前段に CloudFront を置くと、ユーザーの近くでキャッシュされるため表示が速くなり、独自ドメインで HTTPS を使え、オリジンアクセスコントロールでバケットを非公開のままにできます。

CloudFront と Global Accelerator の違いは何ですか?

CloudFront は HTTP コンテンツをユーザーの近くでキャッシュする CDN です。Global Accelerator はキャッシュせず、2 つの静的なグローバル IP を通じて TCP/UDP トラフィックを AWS のネットワークに乗せます。ゲーム、VoIP、リージョン間の高速なフェイルオーバーが必要なアプリに向いています。

CloudFront の料金はどのように決まりますか?

主にユーザーへのデータ転送量とリクエスト数で課金され、料金は地域によって異なります。S3 などの AWS サービスから CloudFront へのデータ転送は無料です。従量課金のほかに、月額定額のプランもあります。

AWS 認定試験では CloudFront について何が問われますか?

CloudFront だけが S3 バケットを読めるようにするオリジンアクセスコントロール、有料コンテンツ向けの署名付き URL と署名付き Cookie、TTL とキャッシュの無効化、地域制限、WAF の適用、Lambda@Edge や CloudFront Functions によるエッジでのコード実行などです。

関連サービス

CloudFront をマップで開く →