DevOps/AWS

CloudFront

prden 2022. 4. 11. 20:34

1. Upload your content to Amazon S3 and grant object permissions

절차

  • Stores the original versions of your objects in an Amazon Simple Storage Service (Amazon S3) bucket ( S3말고 웹서버에 저장해도 된다.)
  • Makes your objects accessible to everyone (signed URL이나 쿠키를 통해 콘텐츠에 접근 제한할 수 있다.) 
  • Uses the CloudFront domain name in URLs for your objects (for example, http://d111111abcdef8.cloudfront.net/index.html)
  • Keeps your objects in CloudFront edge locations for the default duration of 24 hours (the minimum duration is 0 seconds)

 After that, you create a CloudFront distribution, and then use the CloudFront domain name in URLs in your webpages or applications to reference the content.

 

 

2. Create a CloudFront distriution

 

3. Access your content through CloudFront

To access your content through CloudFront, combine your CloudFront distribution domain name with the path to access your content. For example, your distribution domain name looks similar to the following: d111111abcdef8.cloudfront.net. Traditionally, the path to access the main page of a website is /index.html. In this case, you could access your content through CloudFront at a URL that looks similar to the following:

https://d111111abcdef8.cloudfront.net/index.html

 

You have successfully configured CloudFront to serve your website’s content that’s stored in Amazon S3. If you want to go a step further, you can configure your CloudFront distribution to use a custom domain name (for example, www.example.com instead of d111111abcdef8.cloudfront.net). For more information, see Using custom URLs.

 

 

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/GettingStarted.SimpleDistribution.html#GettingStartedAccessingDistributions

 

Getting started with a simple CloudFront distribution - Amazon CloudFront

If you created the bucket in the US East (N. Virginia) Region (us-east-1), omit the portion of the URL. For example: https:// .s3.amazonaws.com/

docs.aws.amazon.com