AWS CloudFront

  1. CloudFront ๋ฅผ ์ƒ์„ฑํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋จผ์ € S3 Bucket ์ด ๋งŒ๋“ค์–ด์ ธ ์žˆ์–ด์•ผ ํ•œ๋‹ค.
    • ์›น์‚ฌ์ดํŠธ๋ฅผ ํ˜ธ์ŠคํŠธํ•  ๋ฒ„ํ‚ท์ด ๋œ๋‹ค.
  2. S3 ๋ฒ„ํ‚ท์„ ์ƒ์„ฑํ›„, CloudFront Console UI ๋กœ ์ ‘๊ทผํ•œ๋‹ค.
  3. CloudFront ๋Š” Global Service ์ด๋‹ค. ์ „์„ธ๊ณ„์— ๋ฐฐํฌ๋˜์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค. (region์ด ์—†์Œ)

image-20220818004728612

  1. ๋ฐฐํฌ๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.
  2. ์›๋ณธ ๋„๋ฉ”์ธ์„ ์„ ํƒํ•œ๋‹ค.
    • S3
    • EC2
    • ALB
    • Gateway โ€ฆ ๋“ฑ๋“ฑ
  3. OAI ์‚ฌ์šฉ์—ฌ๋ถ€๋ฅผ ์„ ํƒ
    • CloudFront ๊ฐ€ S3 ์— ์ ‘๊ทผํ• ๋•Œ ๋ณด์•ˆ์„ ํ™œ์„ฑํ™”ํ• ๊ฒƒ์ธ์ง€ ๋ง๊ฒƒ์ธ์ง€ ๊ฒฐ์ •
    • CloudFront๊ฐ€ ์ƒ์„ฑํ•œ OAI ์‹ ๋ถ„์„ ์ด์šฉํ•ด์„œ S3 Bucket์— ์•ก์„ธ์Šคํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋œ๋‹ค.

image-20220818005139019

ํด๋ผ์šฐ๋“œ ํ”„๋ก ํŠธ๋Š” Amazon S3์— ์žˆ๋Š” ์ฝ˜ํ…์ธ ๋ฅผ ๋ฐฐํฌํ•œ๋‹ค.

  • S3 ๋ฒ„ํ‚ท์ด ํ˜„์žฌ public ์ ‘๊ทผ์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๊ธฐ ๋•Œ๋ฌธ์— CloudFront๋ฅผ ํ†ตํ•ด์„œ๋งŒ ์ ‘๊ทผํ•ด์•ผ๋œ๋‹ค.
    • S3 Bucket ์ƒ์„ฑ์‹œ public ์ ‘๊ทผ ํ—ˆ์šฉ์•ˆํ–ˆ์Œ
    • ๊ณ ๋กœ OAI ๋ฅผ ์‚ฌ์šฉํ•ด์„œ CloudFront โ€“> S3 ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์•„์™€์•ผํ•จ
    • CloudFront ๊ฐ€ ์ œ๊ณตํ•˜๋Š” ๋„๋ฉ”์ธ์ฃผ์†Œ๋กœ ๋“ค์–ด๊ฐ€๊ฒŒ๋˜๋ฉด ์ฒ˜์Œ์—” S3 ์—์„œ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ค๊ณ 
    • ๊ทธ ๋’ค๋ถ€ํ„ฐ๋Š” CloudFront EdgeLocation์— ์žˆ๋Š” ์บ์‹œ์— ์ €์žฅ๋œ ์ปจํ…์ธ ๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๊ฒŒ ๋œ๋‹ค. (CDN)
  • ์•„๋ž˜ ์‚ฌ์ง„์—์„œ๋Š” ์›๋ณธ์„ S3 ๋ฒ„ํ‚ท๋ง๊ณ  ALB ์—์„œ ๊ฐ€์ ธ์˜ค๋„๋ก ์„ค์ •ํ•œ ์‚ฌ๋ก€์ด๋‹ค.

image-20220818010448944

image-20220818010516486

๋Œ“๊ธ€๋‚จ๊ธฐ๊ธฐ