{"id":3167,"date":"2008-11-22T00:33:12","date_gmt":"2008-11-21T16:33:12","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=3167"},"modified":"2018-11-23T00:11:08","modified_gmt":"2018-11-22T16:11:08","slug":"amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/","title":{"rendered":"Amazon CloudFront &#8211; How To Setup CloudFront To Work With S3"},"content":{"rendered":"<p>Assuming you run a high trafficked website or blog and you ran into these following problems:<\/p>\n<ul>\n<li><strong>Slow content serving<\/strong> \u2013 Contents (htmls, images, download files) are serving at extremely slow speed, especially during traffic spikes<\/li>\n<li><strong>Paid, and unused<\/strong> \u2013 You are paying you web host more than what you are actually utilizing. That means, you are probably paying for a web hosting package with 50Gb of web space and 1Tb of bandwidth, but you are barely using half of them.<\/li>\n<li><strong>Messy files\/folders<\/strong> \u2013 The web account is in a mess. Images folders, download-able item folders are not properly organized.<\/li>\n<\/ul>\n<p>All these can be easily solved with <a href=\"https:\/\/aws.amazon.com\/cloudfront\/\"><strong>Amazon CloudFront<\/strong><\/a>. <strong>CloudFront<\/strong> is a new service launched by Amazon, powered by <a href=\"https:\/\/en.wikipedia.org\/wiki\/Cloud_computing\">cloud computing technology<\/a>. Using Amazon S3 as storage, CloudFront serves on top of the buckets and deliver contents at a much higher speed with lower latency. <a href=\"https:\/\/aws.amazon.com\/cloudfront\/\">Click here<\/a> to read more.<\/p>\n<p>If you are already using <a href=\"https:\/\/www.hongkiat.com\/blog\/amazon-s3-the-beginners-guide\/\">Amazon S3<\/a> to serve files for websites, <strong>CloudFront<\/strong> is really something you should check out. We\u2019ll now guide you through setting up CloudFront to serve web files.<\/p>\n<p><!--more--><\/p>\n<ol>\n<li>\n<h2>First and Formost<\/h2>\n<p>Get an <strong>Amazon S3<\/strong> account (<a href=\"https:\/\/www.hongkiat.com\/blog\/amazon-s3-the-beginners-guide\/\">read here<\/a>), then <a href=\"https:\/\/aws-portal.amazon.com\/gp\/aws\/developer\/subscription\/index.html?productCode=AmazonCloudFront\">sign-up<\/a> for an Amazon CloudFront service. Check your email to make sure the service is activated for you.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/sign-up-amazon-cloudfront.jpg\" alt=\"sign up amazon cloudfront\" width=\"500\" height=\"139\"><\/p>\n<\/li>\n<li>\n<h2>Create Distribution<\/h2>\n<p>Applications you use to manage Amazon S3 buckets might varies, but we\u2019ll try to stick to a free tool \u2013 <a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addons\/policy\/0\/3247\/41288\"><strong>S3 Firefox<\/strong><\/a>, a S3 file manager with CloudFront supported. Get connected to your account with S3 Firefox, right click on the bucket name (assuming files and folders inside here are\/will be web accessible) and choose <strong>Manage Distributions<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/select-manage-distribution.jpg\" alt=\"select distribution\" width=\"500\" height=\"246\"><\/p>\n<p><strong>Distribution<\/strong> is an unique URL of sort that you can use to reference a file. You\u2019ll get a better picture once it\u2019s created. Click on <strong>Create Distribution<\/strong> to create your first distribution for the bucket.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/create-distribution.jpg\" alt=\"create disrtribution\" width=\"500\" height=\"327\"><\/p>\n<p>Once you\u2019ve created, you\u2019ll noticed a new Domain Name: <em>XXXXX.cloudfront.net<\/em> is being created for you. Status will turn from <strong><em>InProgress<\/em><\/strong> to <em><strong>Deployed<\/strong><\/em> when it\u2019s done. You can also click on the Refresh button to update the status.<\/p>\n<p>If you previous has this following asset:<\/p>\n<ul>\n<li><strong>https:\/\/assets.hongkiat.com\/uploads\/folder1\/imageA.jpg<\/strong>, it now can be accessed with the URL<\/li>\n<li><strong>http:\/\/XXXXX.cloudfront.net\/folder1\/imageA.jpg <\/strong><\/li>\n<\/ul>\n<p>You still can serve files with the first URL but the latter one is CloudFront powered, and it\u2019s way faster.<\/p>\n<\/li>\n<li>\n<h2>Create CNAME<\/h2>\n<p>Distribution URL starts with <strong>http:\/\/XXXXX.cloudfront.net\/<\/strong> and  we don\u2019t think there\u2019s any way to decide what goes before <em>.cloudfront.net<\/em>. However, to make the URL simplier, nice and easier to remember, we can use CNAME to map this URL to whatever we want. This requires access to web hosting control panels. In this example, we\u2019ll show you how to map:<\/p>\n<ul>\n<li><strong>http:\/\/XXXXX.cloudfront.net\/<\/strong> to <\/li>\n<li><strong>https:\/\/assets.hongkiat.com\/uploads\/<\/strong><\/li>\n<\/ul>\n<p>If you are unfamiliar with CNAMEs, we suggest that you ask your web host to do it for you. You\u2019ll entere something similar to this, with your own distribution URL of course.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/cname-edit.jpg\" alt=\"cname edit\" width=\"500\" height=\"59\"><\/p>\n<p>This might take 24 hours to propagate, but in the mean time, filled up the CNAME in S3 Firefox.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/cname.jpg\" alt=\"cname\" width=\"500\" height=\"236\"><\/p>\n<p>Once it\u2019s properly propagated (you can test with pinging the URL), you can serving files using <em>https:\/\/assets.hongkiat.com\/uploads\/*<\/em>.<\/p>\n<\/li>\n<li>\n<h2>Performance Comparison<\/h2>\n<p>We all know how fast and efficient Amazon S3 serve files, but we thought you should see a comparison after CloudFront is being implemented on top of the serving so you\u2019ll know each and every penny spend is worthwhile. To do a fair compare of the loading speed differences, we took a blog content, load it twice; once with images hosted under <em><strong>hongkiat.s3.amazonaws.com,<\/strong><\/em> another time with images under <em><strong>static.hongkiat.com<\/strong><\/em> (CloudFront) and monitor it with <a href=\"https:\/\/tools.pingdom.com\/\">Pingdom Tools<\/a>. Click on images for larger view.<\/p>\n<p><strong>hongkiat.s3.amazonaws.com \u2013 <\/strong>41 images loaded at 6.5 sec.<\/p>\n<p><a href=\"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/pingdom-amazons3-large.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/pingdom-amazons3.jpg\" alt=\"pingdom\" width=\"500\" height=\"420\"><\/a><\/p>\n<p><strong>static.hongkiat.com<\/strong> (CloudFront)- 41 images loaded at 3.5 sec.<\/p>\n<p><strong><a href=\"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/pingdom-cloudfront-large.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/pingdom-cloudfront.jpg\" alt=\"pingdom cloudfront\" width=\"500\" height=\"428\"><\/a><\/strong><\/p>\n<\/li>\n<\/ol>","protected":false},"excerpt":{"rendered":"<p>Assuming you run a high trafficked website or blog and you ran into these following problems: Slow content serving \u2013 Contents (htmls, images, download files) are serving at extremely slow speed, especially during traffic spikes Paid, and unused \u2013 You are paying you web host more than what you are actually utilizing. That means, you&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3400],"tags":[1101],"topic":[4521],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Amazon CloudFront - How To Setup CloudFront To Work With S3 - Hongkiat<\/title>\n<meta name=\"description\" content=\"Assuming you run a high trafficked website or blog and you ran into these following problems: Slow content serving - Contents (htmls, images, download\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Amazon CloudFront - How To Setup CloudFront To Work With S3\" \/>\n<meta property=\"og:description\" content=\"Assuming you run a high trafficked website or blog and you ran into these following problems: Slow content serving - Contents (htmls, images, download\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2008-11-21T16:33:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-22T16:11:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/sign-up-amazon-cloudfront.jpg\" \/>\n<meta name=\"author\" content=\"Hongkiat Lim\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hongkiat Lim\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/\"},\"author\":{\"name\":\"Hongkiat Lim\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e3613a3bf757e4f67770f0b7a339edd0\"},\"headline\":\"Amazon CloudFront &#8211; How To Setup CloudFront To Work With S3\",\"datePublished\":\"2008-11-21T16:33:12+00:00\",\"dateModified\":\"2018-11-22T16:11:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/\"},\"wordCount\":658,\"commentCount\":26,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/amazon-cloudfront\\\/sign-up-amazon-cloudfront.jpg\",\"keywords\":[\"Amazon\"],\"articleSection\":[\"Hosting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/\",\"name\":\"Amazon CloudFront - How To Setup CloudFront To Work With S3 - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/amazon-cloudfront\\\/sign-up-amazon-cloudfront.jpg\",\"datePublished\":\"2008-11-21T16:33:12+00:00\",\"dateModified\":\"2018-11-22T16:11:08+00:00\",\"description\":\"Assuming you run a high trafficked website or blog and you ran into these following problems: Slow content serving - Contents (htmls, images, download\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/amazon-cloudfront\\\/sign-up-amazon-cloudfront.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/amazon-cloudfront\\\/sign-up-amazon-cloudfront.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Amazon CloudFront &#8211; How To Setup CloudFront To Work With S3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e3613a3bf757e4f67770f0b7a339edd0\",\"name\":\"Hongkiat Lim\",\"description\":\"Founder and Editor in Chief of Hongkiat.com. Hongkiat is also a designer, developer, entrepreneur, and an active investor in the US stock market.\",\"sameAs\":[\"http:\\\/\\\/www.hongkiat.com\\\/blog\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/hongkiat\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Amazon CloudFront - How To Setup CloudFront To Work With S3 - Hongkiat","description":"Assuming you run a high trafficked website or blog and you ran into these following problems: Slow content serving - Contents (htmls, images, download","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/","og_locale":"en_US","og_type":"article","og_title":"Amazon CloudFront - How To Setup CloudFront To Work With S3","og_description":"Assuming you run a high trafficked website or blog and you ran into these following problems: Slow content serving - Contents (htmls, images, download","og_url":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2008-11-21T16:33:12+00:00","article_modified_time":"2018-11-22T16:11:08+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/sign-up-amazon-cloudfront.jpg","type":"","width":"","height":""}],"author":"Hongkiat Lim","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Hongkiat Lim","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/"},"author":{"name":"Hongkiat Lim","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e3613a3bf757e4f67770f0b7a339edd0"},"headline":"Amazon CloudFront &#8211; How To Setup CloudFront To Work With S3","datePublished":"2008-11-21T16:33:12+00:00","dateModified":"2018-11-22T16:11:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/"},"wordCount":658,"commentCount":26,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/sign-up-amazon-cloudfront.jpg","keywords":["Amazon"],"articleSection":["Hosting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/","url":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/","name":"Amazon CloudFront - How To Setup CloudFront To Work With S3 - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/sign-up-amazon-cloudfront.jpg","datePublished":"2008-11-21T16:33:12+00:00","dateModified":"2018-11-22T16:11:08+00:00","description":"Assuming you run a high trafficked website or blog and you ran into these following problems: Slow content serving - Contents (htmls, images, download","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/sign-up-amazon-cloudfront.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/amazon-cloudfront\/sign-up-amazon-cloudfront.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/amazon-cloudfront-how-to-setup-cloudfront-to-work-with-s3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Amazon CloudFront &#8211; How To Setup CloudFront To Work With S3"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e3613a3bf757e4f67770f0b7a339edd0","name":"Hongkiat Lim","description":"Founder and Editor in Chief of Hongkiat.com. Hongkiat is also a designer, developer, entrepreneur, and an active investor in the US stock market.","sameAs":["http:\/\/www.hongkiat.com\/blog"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/hongkiat\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-P5","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/3167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=3167"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/3167\/revisions"}],"predecessor-version":[{"id":46105,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/3167\/revisions\/46105"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=3167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=3167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=3167"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=3167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}