Quiz

  1. S3 ๋ฒ„ํ‚ท์— ์œ ๋ฃŒ ์ฝ˜ํ…์ธ ๊ฐ€ ์ €์žฅ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์ฝ˜ํ…์ธ ๋ฅผ ์ „์—ญ์ ์œผ๋กœ ๋ถ„๋ฐฐํ•˜๊ธฐ ์œ„ํ•ด CloudFront ๋ฐฐํฌ๋ฅผ ์„ค์ •ํ•˜๊ณ  S3 ๋ฒ„ํ‚ท์ด CloudFront ๋ฐฐํฌ์—์„œ๋งŒ ๋ฐ์ดํ„ฐ๋ฅผ ๊ตํ™˜ํ•˜๋„๋ก ๊ตฌ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ CloudFront ๊ธฐ๋Šฅ ์ค‘ ์œ ๋ฃŒ ์ฝ˜ํ…์ธ ๋ฅผ ์•ˆ์ „ํ•˜๊ฒŒ ๋ถ„๋ฐฐํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋ฌด์—‡์„ ์‚ฌ์šฉํ•ด์•ผ ํ• ๊นŒ์š”?
    • ์›๋ณธ ์•ก์„ธ์Šค ID
    • S3 ๋ฏธ๋ฆฌ ์„œ๋ช…๋œ URL
    • CloudFront ์„œ๋ช…๋œ URL
    • CloudFront ๋ฌดํšจํ™”


CloudFront ์„œ๋ช…๋œ URL์€ ์ผ๋ฐ˜์ ์œผ๋กœ ๋™์ ์œผ๋กœ ์ƒ์„ฑ๋œ URL์„ ํ†ตํ•ด ์œ ๋ฃŒ ์ฝ˜ํ…์ธ ๋ฅผ ๋ฐฐํฌํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.



  1. Application Load Balancer๊ฐ€ ๊ด€๋ฆฌํ•˜๋Š” EC2 ์ธ์Šคํ„ด์Šค ํ”Œ๋ฆฟ์— ํ˜ธ์ŠคํŒ…๋œ ์›น์‚ฌ์ดํŠธ๋ฅผ ์ œ๊ณตํ•˜๋Š” CloudFront ๋ฐฐํฌ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ชจ๋“  ํด๋ผ์ด์–ธํŠธ๊ฐ€ ๋ฏธ๊ตญ์— ์žˆ๋Š”๋ฐ๋„ ๋ถˆ๊ตฌํ•˜๊ณ , ํƒ€ ๊ตญ๊ฐ€๋กœ๋ถ€ํ„ฐ ์ผ๋ถ€ ์•…์„ฑ ์š”์ฒญ์ด ๋“ค์–ด์˜ค๊ณ  ์žˆ๋‹ค๋Š” ์ ์„ ๋ฐœ๊ฒฌํ–ˆ์Šต๋‹ˆ๋‹ค. ์˜ค์ง ๋ฏธ๊ตญ์œผ๋กœ๋ถ€ํ„ฐ์˜ ์‚ฌ์šฉ์ž๋“ค๋งŒ์„ ํ—ˆ๊ฐ€ํ•˜๊ณ , ๋‹ค๋ฅธ ๊ตญ๊ฐ€๋Š” ์ฐจ๋‹จํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ• ๊นŒ์š”?
    • CloudFront ์ง€๋ฆฌ์  ์ œํ•œ ์‚ฌ์šฉํ•˜๊ธฐ
    • ์›๋ณธ ์•ก์„ธ์Šค ID ์‚ฌ์šฉํ•˜๊ธฐ
    • ๋ณด์•ˆ ๊ทธ๋ฃน์„ ์„ค์ •ํ•œ ๋’ค ์ด๋ฅผ CloudFront ๋ฐฐํฌ์— ์—ฐ๊ฒฐํ•˜๊ธฐ
    • Route53 ์ง€์—ฐ ์‹œ๊ฐ„์„ ์ด์šฉํ•ด ์ด๋ฅผ CloudFront ๋ถ„๋ฐฐ๋กœ ์—ฐ๊ฒฐํ•˜๊ธฐ



  1. S3 ๋ฒ„ํ‚ท ์ƒ์— ํ˜ธ์ŠคํŒ…๋œ ์ •์  ์›น์‚ฌ์ดํŠธ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์š”์ฒญ์„ ๋” ์ž˜ ์ฒ˜๋ฆฌํ•˜๊ณ  ์„ฑ๋Šฅ์„ ํ–ฅ์ƒ์‹œํ‚ค๊ธฐ ์œ„ํ•ด S3 ๋ฒ„ํ‚ท์„ ๊ฐ€๋ฆฌํ‚ค๋Š” CloudFront ๋ฐฐํฌ๋ฅผ ์ƒ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค. ์–ผ๋งˆ ํ›„, ์—ฌ๋Ÿฌ๋ถ„์€ ์•„์ง๋„ ์‚ฌ์šฉ์ž๋“ค์ด S3 ๋ฒ„ํ‚ท์—์„œ ์›น์‚ฌ์ดํŠธ๋กœ ์ง์ ‘ ์•ก์„ธ์Šคํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ๋ถ„์€ ์‚ฌ์šฉ์ž๋“ค์ด CloudFront๋งŒ์„ ํ†ตํ•ด์„œ ์›น์‚ฌ์ดํŠธ๋กœ ์•ก์„ธ์Šคํ•˜๊ฒŒ๋” ํ•˜๋ ค ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฅผ ์œ„ํ•ด์„œ๋Š” ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ• ๊นŒ์š”?
    • ํด๋ผ์ด์–ธํŠธ๋“ค์—๊ฒŒ ์ด๋ฉ”์ผ์„ ๋ณด๋‚ด S3 ์—”๋“œ ํฌ์ธํŠธ๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ๋ง ๊ฒƒ์„ ์š”์ฒญ
    • CloudFront ๋ฐฐํฌ๋ฅผ ๊ตฌ์„ฑํ•ด ์›๋ณธ ์•ก์„ธ์Šค ID๋ฅผ ์ƒ์„ฑํ•œ ํ›„, ์˜ค์ง CloudFront ๋ฐฐํฌ OAI ์‚ฌ์šฉ์ž๋“ค์ด ๋ณด๋‚ด๋Š” ์š”์ฒญ๋งŒ์„ ์ˆ˜๋ฝํ•˜๋„๋ก ์—…๋ฐ์ดํŠธ
    • ํด๋ผ์ด์–ธํŠธ๊ฐ€ CloudFront๋กœ ๋ฆฌ๋‹ค์ด๋ ‰ํŒ…๋˜๋„๋ก S3 ์•ก์„ธ์Šค ํฌ์ธํŠธ ์‚ฌ์šฉ



  1. Application Load Balancer๊ฐ€ ๊ด€๋ฆฌํ•˜๋Š” ํ•œ ์„ธํŠธ์˜ EC2 ์ธ์Šคํ„ด์Šค์— ์›น์‚ฌ์ดํŠธ๊ฐ€ ํ˜ธ์ŠคํŒ…๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ๋ถ„์€ CloudFront ๋ฐฐํฌ๋ฅผ ์ƒ์„ฑํ•ด ๊ทธ ์˜ค๋ฆฌ์ง„์ด ALB๋ฅผ ๊ฐ€๋ฆฌํ‚ค๋„๋ก ์„ค์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. CloudFront ๋ฐฐํฌ๋ฅผ ํ†ตํ•ด ์ œ๊ณต๋˜๋Š” ์ˆ˜๋ฐฑ ๊ฐœ์˜ ์‚ฌ์„ค ํŒŒ์ผ์— ๋Œ€ํ•œ ์•ก์„ธ์Šค๋ฅผ ์ œ๊ณตํ•˜๋ ค๋ฉด ๋ฌด์—‡์„ ์‚ฌ์šฉํ•ด์•ผ ํ• ๊นŒ์š”?
    • CloudFront ์„œ๋ช…๋œ URL
    • CloudFront ์›๋ณธ ์•ก์„ธ์Šค ID
    • CloudFront ์„œ๋ช…๋œ ์ฟ ํ‚ค
    • CloudFront HTTPS ์•”ํ˜ธํ™”


์„œ๋ช…๋œ ์ฟ ํ‚ค๋Š” ๋‹ค์ˆ˜์˜ ํŒŒ์ผ์— ์•ก์„ธ์Šคํ•˜๋Š” ๋ฐ์— ์œ ์šฉํ•˜๊ณ , ์„œ๋ช…๋œ URL์€ ๊ฐœ๋ณ„ ํŒŒ์ผ์— ์•ก์„ธ์Šคํ•˜๋Š” ๋ฐ์— ์œ ์šฉ



  1. HTTP REST API๋ฅผ ๋…ธ์ถœ์‹œํ‚ฌ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ƒ์„ฑํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์š”์ฒญ ๋ผ์šฐํŒ… ๊ทœ์น™์„ HTTL ๋ ˆ๋ฒจ์—์„œ ์ œ๊ณตํ•ด์•ผ ํ•  ํ•„์š”๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ณด์•ˆ ์š”๊ตฌ ์‚ฌํ•ญ ๋•Œ๋ฌธ์—, ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์€ ๋‘ ๊ฐœ์˜ ์ •์  IP ์ฃผ์†Œ๋ฅผ ํ†ตํ•ด์„œ๋งŒ ๋…ธ์ถœ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์š”๊ตฌ ์‚ฌํ•ญ์„ ์ถฉ์กฑ์‹œํ‚ค๊ธฐ ์œ„ํ•œ ์†”๋ฃจ์…˜์„ ์ƒ์„ฑํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผ ํ• ๊นŒ์š”?
    • NLB ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ํƒ„๋ ฅ์ IP ๋ฅผ ์—ฌ๊ธฐ์— ์—ฐ๊ฒฐ
    • AWS Global Accelerator ์™€ ALB ์‚ฌ์šฉ
    • ALB ์‚ฌ์šฉํ•˜๊ณ  ํƒ„๋ ฅ์  IP๋ฅผ ์—ฌ๊ธฐ์— ์—ฐ๊ฒฐ
    • CloudFront ๋ฅผ ํƒ„๋ ฅ์ IP์™€ ALB์™€ ํ•จ๊ป˜ ์‚ฌ์šฉ


AWS Global Accelerator๋Š” ๋‘ ๊ฐœ์˜ ์ •์  IP ์ฃผ์†Œ๋ฅผ ์ œ๊ณตํ•˜๋ฉฐ, ALB๋Š” HTTP ๋ผ์šฐํŒ… ๊ทœ์น™์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.



  1. ์ด S3 ๋ฒ„ํ‚ท ์ •์ฑ…์ด ํ•˜๋Š” ์—ญํ• ์ด ๋ฌด์—‡์ผ๊นŒ์š”?
{
    "Version": "2012-10-17",
    "Id": "Mystery policy",
    "Statement": [{
         "Sid": "What could it be?",
         "Effect": "Allow",
         "Principal": {
             "CanonicalUser": "CloudFront Origin Identity Canonical User ID"
         },
         "Action": "s3:GetObject",
         "Resource": "arn:aws:s3:::examplebucket/*"
    }]
}
  • CloudFront ์—์„œ GetObject ์š”์ฒญ์ด ์žˆ์„ ๊ฒฝ์šฐ, ์ด๋ฅผ ์•”ํ˜ธํ™”ํ•˜๋„๋ก ๊ฐ•์ œ
  • CloudFront ๋ฐฐํฌ ์›๋ณธ ์•ก์„ธ์ŠคID ์—์„œ ์˜ค๋Š” S3๋ฒ„ํ‚ท ์ฝ˜ํ…์ธ ๋งŒ์ด ํ‰๊ฐ€๋ ์ˆ˜ ์žˆ๋„๋ก ํ—ˆ๊ฐ€
  • S3 ๋ฒ„ํ‚ท์— ๋Œ€ํ•œ GetObject ์œ ํ˜•์˜ ์š”์ฒญ๋งŒ์„ ํ—ˆ๊ฐ€

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