CloudFront CDN
전 세계 엣지 CDN. 지연시간 감소와 오리진 부하 경감
이게 뭔가요? / What is this?
CloudFront는 특정 장비 하나가 아니라, 전 세계 곳곳에 흩어진 캐시 서버(엣지 로케이션) 네트워크를 관리형으로 빌려 쓰는 서비스입니다. 본사 창고 하나에서 전 세계로 배송하는 대신 동네마다 편의점을 두고 인기 상품을 미리 채워 놓는 것과 비슷해서, 사용자와 가까운 곳에서 바로 콘텐츠를 내려받게 해줍니다.
개요 / Overview
CloudFront는 전 세계 엣지 로케이션에 콘텐츠를 캐싱해 사용자와 가까운 곳에서 응답합니다. "전 세계 사용자의 지연시간을 줄여라", "정적 콘텐츠 전송 비용 절감"의 표준 정답이며, S3와 짝을 이룹니다.
동작 원리 / How it works
CloudFront는 전 세계 엣지 로케이션에 배포(distribution)를 두고, 사용자를 가장 가까운 엣지로 보냅니다. 엣지에 캐시가 있으면 즉시 응답하고, 없으면 리전 엣지 캐시를 거쳐 오리진에서 가져오면서 캐시에 채웁니다. 중요한 점은 캐시 미스에서도 오리진까지 AWS 백본망을 타기 때문에, 캐싱 불가능한 동적 요청도 공용 인터넷보다 빠르다는 것입니다.
캐시 키는 URL과 여러분이 지정한 헤더·쿠키·쿼리스트링 조합으로 만들어집니다. 캐시 키에 불필요한 값(예: 모든 쿠키)을 넣으면 캐시가 잘게 쪼개져 적중률이 떨어집니다 — 캐시 히트율 문제의 흔한 원인입니다.
시험은 무엇을 보는가 / What the exam is testing
시험은 CloudFront를 두 목적으로 씁니다 — 전 세계 지연시간 감소와 오리진 보호(부하·비용·보안). 특히 S3를 비공개로 두고 OAC로만 읽게 하는 패턴은 거의 고정 정답이며, WAF·지리적 제한·서명된 URL이 여기에 얹힙니다.
시험 포인트 / Exam points
Origin Access Control을 쓰면 S3 버킷을 비공개로 둔 채 CloudFront만 읽게 할 수 있습니다. 버킷을 퍼블릭으로 여는 선택지는 항상 오답입니다.
유료 콘텐츠처럼 접근을 제한하려면 서명된 URL(개별 파일)이나 서명된 쿠키(여러 파일)를 씁니다. S3 사전 서명 URL과 목적은 같지만 엣지에서 동작합니다.
국가 단위 차단은 CloudFront 지리적 제한으로, SQL 인젝션·봇 차단은 AWS WAF를 CloudFront에 연결해 처리합니다.
캐싱하지 않는 요청도 AWS 백본망을 타고 오리진에 도달해 인터넷 경유보다 빠릅니다. "정적 파일만"이라는 통념은 틀립니다.
자주 틀리는 함정 / Common traps
CloudFront를 붙이면서 S3 버킷을 퍼블릭으로 여는 선택지 — OAC를 쓰면 비공개를 유지할 수 있으므로 오답입니다.
CloudFront용 ACM 인증서를 서비스 리전에서 발급하는 것 — 반드시 us-east-1이어야 합니다.
"정적 파일만 가속된다"고 판단해 동적 API에 CloudFront를 배제하는 것 — 백본 경유만으로도 이득이 있습니다.
헷갈리는 것 구분하기 / Telling them apart
캐싱 여부와 프로토콜로 갈립니다. HTTP 콘텐츠를 캐싱해 지연을 줄이면 CloudFront, 캐싱 없이 TCP/UDP 트래픽을 백본으로 태우고 고정 IP·빠른 리전 장애 조치가 필요하면 Global Accelerator입니다.
Amazon CloudFront
Global edge CDN that cuts latency and offloads the origin
이게 뭔가요? / What is this?
CloudFront is not a single piece of equipment — it is a managed service that puts content on a worldwide network of cache servers (edge locations). It is like stocking popular items at neighborhood convenience stores instead of shipping everything from one central warehouse, so users can grab content from somewhere close to them.
개요 / Overview
CloudFront caches content at edge locations worldwide so responses come from near the user. It is the standard answer to "reduce latency for global users" and "cut delivery cost for static content", usually paired with S3.
동작 원리 / How it works
CloudFront places a distribution across global edge locations and steers each user to the nearest one. A cache hit answers immediately; a miss goes through a regional edge cache to the origin and populates on the way back. Crucially, even a miss travels the AWS backbone to the origin, so uncacheable dynamic requests still beat the public internet.
The cache key is built from the URL plus whichever headers, cookies, and query strings you include. Putting unnecessary values in the key (all cookies, say) fragments the cache and drops the hit rate — the usual cause of poor cache-hit questions.
시험은 무엇을 보는가 / What the exam is testing
The exam uses CloudFront for two purposes: cutting global latency and protecting the origin (load, cost, security). The pattern of keeping S3 private and readable only through OAC is almost a fixed answer, with WAF, geo restriction, and signed URLs layered on.
시험 포인트 / Exam points
Origin Access Control lets CloudFront read a bucket that stays private. Any option that makes the bucket public is wrong.
Restrict access with signed URLs (single file) or signed cookies (many files) — the edge equivalent of S3 presigned URLs.
Block by country with CloudFront geo restriction; block SQL injection and bots by attaching AWS WAF to the distribution.
Even uncached requests travel the AWS backbone to the origin, beating the public internet. The "static only" assumption is wrong.
자주 틀리는 함정 / Common traps
Fronting S3 with CloudFront while making the bucket public — OAC keeps it private, so this is wrong.
Issuing the ACM certificate for CloudFront in the service Region — it must be us-east-1.
Excluding CloudFront from a dynamic API because "it only accelerates static files" — the backbone path alone helps.
헷갈리는 것 구분하기 / Telling them apart
Decided by caching and protocol. Caching HTTP content to cut latency → CloudFront. Carrying uncacheable TCP/UDP over the backbone with static IPs and fast regional failover → Global Accelerator.
AWS SAA Hub Pro는 독립 학습 자료이며 Amazon Web Services, Inc.의 공식 서비스가 아닙니다. 시험 정책과 서비스 사양은 AWS 공식 문서를 기준으로 확인하세요.