17D. Route 53์ CloudFront ์ฐ๋ํ๊ธฐ
17D. Route 53์ CloudFront ์ฐ๋ํ๊ธฐ ๊ด๋ จ

CloudFront ๋ฐฐํฌDistribution๋ฅผ Route 53๋ฅผ ํตํด ๋๋ฉ์ธ๊ณผ ์ฐ๊ฒฐํ ์ ์์ต๋๋ค. '12์ฅ ์ ์ธ๊ณ์ ์ฝํ ์ธ ๋ฅผ ๋ฐฐํฌํ๋ CDN ์๋น์ค์ธ CloudFront'๋ฅผ ์ฐธ์กฐํ์ฌ CloudFront ๋ฐฐํฌ๋ฅผ ๋จผ์ ์์ฑํ๊ธฐ ๋ฐ๋๋๋ค.

[Distribution Settings]
๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.
[General]
ํญ์์ [Edit]
๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.CloudFront ๋ฐฐํฌ ์ค์ ์์ Alternate Domain Names ๋ถ๋ถ์ ์ฐ๊ฒฐํ๊ณ ์ ํ๋ ๋๋ฉ์ธ์ ์
๋ ฅํฉ๋๋ค. ์ ๋ cf.
๊ฐ ๋ถ์ ์๋ธ ๋๋ฉ์ธ์ ์
๋ ฅํ์ต๋๋ค.

[Yes, Edit]
๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.๋ฃจํธ ๋๋ฉ์ธ๊ณผ www ์๋ธ ๋๋ฉ์ธ
CloudFront ๋ฐฐํฌ๋ฅผ ๋ฃจํธ ๋๋ฉ์ธ๊ณผ www ์๋ธ ๋๋ฉ์ธ์ ๋ชจ๋ ์ฐ๊ฒฐํ๋ ค๋ฉด ๋๋ฉ์ธ ๋ ๊ฐ์ง ๋ชจ๋ ์ ๋ ฅํฉ๋๋ค.
์)
example.com
www.example.com

[CloudFront Distributions]
๋ฅผ ํด๋ฆญํฉ๋๋ค.๋ฐฉ๊ธ ์ค์ ์ ๋ณ๊ฒฝํ CloudFront ๋ฐฐํฌ์ Status๋ฅผ ๋ณด๋ฉด InProgress๋ก ํ์๋๋ฉฐ ์ธ๋์ผ์ดํฐ๊ฐ ํ์ ํ๋ ๊ฒ์ ํ์ธํ ์ ์์ต๋๋ค.

Route 53 ๋ฉ์ธ ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.

[Go to Record Sets]
๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.๋๋ฉ์ธ์ ๋ ์ฝ๋ ๋ชฉ๋ก์ด ํ์๋ฉ๋๋ค.

[Create Record Set]
๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.cf ์๋ธ๋๋ฉ์ธ์ ๋ํ A ๋ ์ฝ๋๋ฅผ ์์ฑํฉ๋๋ค.
- Name: cf ์๋ธ๋๋ฉ์ธ์ ๋ํ A ๋ ์ฝ๋๋ฅผ ์์ฑํ ๊ฒ์ด๋ฏ๋ก cf๋ฅผ ์ ๋ ฅํฉ๋๋ค.
- Type: ๋ ์ฝ๋ ์ข ๋ฅ๋ฅผ ์ค์ ํฉ๋๋ค. ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก A - IPv4 address๋ฅผ ์ ํํฉ๋๋ค.
- Alias: Yes๋ฅผ ์ ํํ์ฌ IP ์ฃผ์ ๋์ AWS ๋ฆฌ์์ค๋ฅผ ์ค์ ํฉ๋๋ค.
- Alias Target: AWS ๋ฆฌ์์ค์ ์ฃผ์๋ฅผ ์ค์ ํฉ๋๋ค. Alias Target ์
๋ ฅ ๋ถ๋ถ์ ํด๋ฆญํ๋ฉด ์ฌ์ฉํ ์ ์๋ AWS ๋ฆฌ์์ค(S3, ELB, CloudFront)์ ๋ชฉ๋ก์ด ํ์๋ฉ๋๋ค. CloudFront Distributions์
cf.<๋๋ฉ์ธ>
(xxxxxxxxxxxxxxx.cloudfront.net)์ ์ ํํฉ๋๋ค. - Alias Hosted Zone ID: Alias Target์ ์ ํํ๋ฉด ์๋์ผ๋ก ์ค์ ๋ฉ๋๋ค.
- Routing Policy: ๋ผ์ฐํ ์ ์ฑ ์ ์ค์ ํฉ๋๋ค. ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก Simple์ ์ ํํฉ๋๋ค.
- Evaluate Target Health: CloudFront๋ ์ด ๊ธฐ๋ฅ์ ์ฌ์ฉํ ์ ์์ผ๋ฏ๋ก ๊ธฐ๋ณธ๊ฐ ๊ทธ๋๋ก ์ฌ์ฉํฉ๋๋ค.

[Create]
๋ฒํผ์ ํด๋ฆญํฉ๋๋ค.

๋ฃจํธ ๋๋ฉ์ธ๊ณผ www ์๋ธ ๋๋ฉ์ธ
CloudFront ๋ฐฐํฌ๋ฅผ ๋ฃจํธ ๋๋ฉ์ธ๊ณผ www ์๋ธ ๋๋ฉ์ธ์ผ๋ก ์ฐ๊ฒฐํ๋ ค๋ฉด A ๋ ์ฝ๋๋ฅผ Alias๋ก ์ค์ ํ์ฌ ๋ฃจํธ ๋๋ฉ์ธ๊ณผ www ์๋ธ ๋๋ฉ์ธ์ ์ถ๊ฐํ๋ฉด ๋ฉ๋๋ค.