{"id":1942,"date":"2016-08-17T08:41:45","date_gmt":"2016-08-17T08:41:45","guid":{"rendered":"https:\/\/www.botreetechnologies.com\/blog\/?p=1942"},"modified":"2023-02-16T16:02:14","modified_gmt":"2023-02-16T10:32:14","slug":"ruby-on-rails-discovering-amazon-cloudfront","status":"publish","type":"post","link":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/","title":{"rendered":"Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront"},"content":{"rendered":"\n<p>Whenever we come across implementing file uploading functionality in Rails, we either use the&nbsp;<a href=\"https:\/\/github.com\/carrierwaveuploader\/carrierwave\" target=\"_blank\" rel=\"noopener noreferrer\">CarrierWave<\/a>&nbsp;or the&nbsp;<a href=\"https:\/\/github.com\/thoughtbot\/paperclip\" target=\"_blank\" rel=\"noopener noreferrer\">PaperClip<\/a>&nbsp;gem.&nbsp;<a href=\"https:\/\/github.com\/fog\/fog-aws\" target=\"_blank\" rel=\"noopener noreferrer\">Fog<\/a>&nbsp;is the choice for Amazon S3. This setup works fairly well, easy to setup and runs successfully on production in a day.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Background<\/h2>\n\n\n\n<p>For security reasons, Amazon S3 configuration for CarrierWave has a configuration option &#8216;<i>fog_authenticated_url_expiration<\/i>&#8216; which defines the seconds to live for the URL, when used with &#8216;<i>fog_public = true<\/i>&#8216;. This enables CarrierWave to generate a signed URL which can be accessed for the defined seconds only, after which the S3 document URL expires. This is provided for security reasons. When we want to upload private data on the S3 cloud buckets, such an arrangement keeps the data secure from guest users.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>What happens when the URL&nbsp;expires?<\/p>\n<\/blockquote>\n\n\n\n<p>In real time, when user has opened up a page which has private S3 download URLs and stayed inactive for sometime, the link timeout will expire it. Now, when user clicks on the link, it tries to open the document but S3 would throw &#8216;<i>AccessDenied<\/i>&#8216; error and show an error page with an XML content.<\/p>\n\n\n\n<pre id=\"9841\" class=\"wp-block-preformatted graf graf--pre graf-after--p\">&lt;Error&gt;\n  &lt;Code&gt;AccessDenied&lt;\/Code&gt;\n  &lt;Message&gt;Request has expired&lt;\/Message&gt;\n  &lt;X-Amz-Expires&gt;300&lt;\/X-Amz-Expires&gt;\n  &lt;Expires&gt;2016-08-05T13:05:37Z&lt;\/Expires&gt;\n  &lt;ServerTime&gt;2016-08-17T14:01:50Z&lt;\/ServerTime&gt;\n  &lt;RequestId&gt;5e674uth3q4&lt;\/RequestId&gt;\n  &lt;HostId&gt;\n    XERYHFXDZHBDFHt7e45ysetrzhdfy\n  &lt;\/HostId&gt;\n&lt;\/Error&gt;<\/pre>\n\n\n\n<p>This appears annoying and the user experience deteriorates. To handle such a case gracefully, one of the following needs to be done.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Make the download URLs public &#8211; This is not feasible most of the times.<\/li>\n\n\n\n<li>Increase the time to expire, which just decreases the probability of this error, but does not really fix it, its just a work around.<\/li>\n\n\n\n<li>Implement a page instead of this XML response. &#8211; <b>Bang!<\/b><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Solution<\/h3>\n\n\n\n<p>For point 3 defined above, Amazon has another service called&nbsp;<b>CloudFront<\/b>which allows us to define custom error page and rules to redirect to it on specific HTTP errors. But as usual, Amazon has &#8220;<i>amazing<\/i>&#8221; documentation to for help!<\/p>\n\n\n\n<p>Never-mind, There are some really nice articles which explain the whole process of configuring&nbsp;<a href=\"https:\/\/aws.amazon.com\/cloudfront\/\" target=\"_blank\" rel=\"noopener noreferrer\">CloudFront<\/a>.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><a href=\"https:\/\/aws.amazon.com\/blogs\/aws\/custom-error-pages-and-responses-for-amazon-cloudfront\/\" target=\"_blank\" rel=\"noopener noreferrer\"><b>Custom Error Pages and Responses for Amazon CloudFront | AWS Blog<\/b><br><i>You can create a separate custom error response for each of the ten HTTP status codes listed in the menu. The Response&#8230;<\/i> aws.amazon.com<\/a><\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>But, What&nbsp;next?<\/p>\n<\/blockquote>\n\n\n\n<p>Configuring&nbsp;<a href=\"https:\/\/aws.amazon.com\/cloudfront\/\" target=\"_blank\" rel=\"noopener noreferrer\">CloudFront<\/a> just does not plug it with the S3 configuration for CarrierWave. First thing is,&nbsp;<a href=\"https:\/\/aws.amazon.com\/cloudfront\/\" target=\"_blank\" rel=\"noopener noreferrer\">CloudFront<\/a>&nbsp;has created a CDN URL for us, but to use that URL, we need to replace the domain name in S3 URL.<\/p>\n\n\n\n<p>So, &#8220;<i>https:\/\/s3.amazonaws.com\/exampleBucket\/26b8dbda-32a8-4e54-99d8.txt?X-Amz-Date=20160805T130037Z&amp;X-Amz-Expires=300&#8230;<\/i>&#8221; should be changed as &#8220;<i>https:\/\/my-new-id.cloudfront.net\/exampleBucket\/26b8dbda-32a8-4e54-99d8.txt?X-Amz-Date=20160805T130037Z&amp;X-Amz-Expires=300&#8230;<\/i>&#8220;.<\/p>\n\n\n\n<p>This URL would be accessible, and to change it at where its generated we have to use the following property in &#8216;carrier_wave.rb&#8217; initializer.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">config.asset_host = \"https:\/\/my-new-id.cloudfront.net\"<\/pre>\n\n\n\n<p>But this does not work with &#8216;<i>config.fog_public = true<\/i>&#8216; option, and we don&#8217;t want to make it public! Its a bottleneck!<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>How to generate CloudFront signed URL with CarrierWave?<\/p>\n<\/blockquote>\n\n\n\n<p><a href=\"https:\/\/github.com\/leonelgalan\/cloudfront-signer\" target=\"_blank\" rel=\"noopener noreferrer\">cloudfront-signer<\/a>&nbsp;gem to the rescue! Yes, there is another gem which provides the interface to create signed URL (similar to S3 URLs) with CarrierWave. We need to follow the steps below.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create&nbsp;<a href=\"https:\/\/aws.amazon.com\/cloudfront\/\" target=\"_blank\" rel=\"noopener noreferrer\">CloudFront<\/a>&nbsp;keys &#8211; From amazon console, click on &#8220;&lt;your name&gt;&#8221; dropdown -&gt; &#8220;security credentials&#8221; -&gt; &#8220;<a href=\"https:\/\/aws.amazon.com\/cloudfront\/\" target=\"_blank\" rel=\"noopener noreferrer\">CloudFront<\/a> key pairs&#8221; -&gt; &#8220;create new key pairs&#8221;<\/li>\n\n\n\n<li>Download the key pairs and store it at a secure place.<\/li>\n\n\n\n<li>Install&nbsp;<a href=\"https:\/\/github.com\/leonelgalan\/cloudfront-signer\" target=\"_blank\" rel=\"noopener noreferrer\">cloudfront-signer<\/a>&nbsp;gem, and instead of fog configuration add new cofnguration for AWS as following,<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">CarrierWave.configure do |config|\n  \n  config.storage  = :aws\n  config.aws_bucket = Rails.env.development? ? 'dev0bucket' : 'prod-bucket'\n  config.aws_acl  = 'public-read'\n  \n  config.aws_attributes = {\n   expires: 10.minutes.from_now.httpdate,\n   cache_control: 'max-age=604800'\n  }\n  \n  config.aws_credentials = {\n   access_key_id:   Settings.carrier_wave.amazon_s3.access_key,\n   secret_access_key: Settings.carrier_wave.amazon_s3.secret_key,\n   region:      'us-standard' # Required\n  }\n  \n  config.asset_host = \"https:\/\/my-new-id.cloudfront.net\"\n  \n  config.aws_signer = -&gt; (unsigned_url, options) {       \n    Aws::CF::Signer.sign_url(unsigned_url, options) \n  }\nend\n<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reboot the rails application, and it should generate appropriate CloudFront CDN based URLs.<\/li>\n\n\n\n<li>Open a document in a new tab, change the URL or wait for 10 minutes till it expires. Then try again accessing it. It should redirect and show the custom error page as you have defined.<\/li>\n<\/ul>\n\n\n\n<p>This way, we can show a custom error or notification pages for diff. HTTP errors while accessing Amazon S3. CloudFront provides a better interface instead of just showing the XML error, this could be helpful to non-techie users.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">References<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><a href=\"http:\/\/www.srooltheknife.com\/2016\/04\/using-signed-urls-with-cloudfront.html\" target=\"_blank\" rel=\"noopener noreferrer\"><b>Srool The Knife: Using Signed URLs with CloudFront, CarrierWave and Rails<\/b><br><i>Edit description<\/i> www.srooltheknife.com<\/a><\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/9956712\/use-cdn-with-carrierwave-fog-in-s3-cloudfront-with-rails-3-1\" target=\"_blank\" rel=\"noopener noreferrer\"><b>Use CDN with carrierwave + fog in s3 + cloudfront with rails 3.1<\/b><br><i>I&#8217;m using fog with carrierwave in my website. But the images load very very slowly. Then I want to speed up loading of&#8230;<\/i> stackoverflow.com<\/a><\/p>\n<\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><a href=\"https:\/\/github.com\/leonelgalan\/cloudfront-signer\" target=\"_blank\" rel=\"noopener noreferrer\"><b>leonelgalan\/cloudfront-signer<\/b><br><i>cloudfront-signer &#8211; Ruby gem for signing AWS CloudFront private content URLs and streaming paths.<\/i> github.com<\/a><\/p>\n<\/blockquote>\n\n\n\n<p><a href=\"https:\/\/www.botreetechnologies.com\/ruby-on-rails-development\"><strong><b>Click here for more<\/b> details&#8230;<\/strong><\/a><\/p>\n\n\n\n<p>At<a href=\"https:\/\/www.botreetechnologies.com\/\"> BoTree Technologies<\/a>, we build enterprise applications with our <a href=\"https:\/\/www.botreetechnologies.com\/hire-ruby-on-rails-developers\" target=\"_blank\" rel=\"noopener noreferrer\">RoR team of 25+ engineers<\/a>.<\/p>\n\n\n\n<p>We also specialize in Python, RPA, AI, Django, JavaScript and ReactJS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.botreetechnologies.com\/contact\">Consulting is free<\/a> &#8211; let us help you grow!<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Whenever we come across implementing file uploading functionality in Rails,&#8230;<\/p>\n","protected":false},"author":6,"featured_media":13949,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,10],"tags":[],"class_list":["post-1942","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-on-rails","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront<\/title>\n<meta name=\"description\" content=\"CloudFront provides better interface instead of just showing the XML error, this could be helpful to non-techie users using ruby on rails.\" \/>\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.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront\" \/>\n<meta property=\"og:description\" content=\"CloudFront provides better interface instead of just showing the XML error, this could be helpful to non-techie users using ruby on rails.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/\" \/>\n<meta property=\"og:site_name\" content=\"BoTree Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BoTreeTechnologies\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-08-17T08:41:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-16T10:32:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/08\/cloudfront.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"853\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Parth Barot\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:site\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Parth Barot\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/\"},\"author\":{\"name\":\"Parth Barot\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f\"},\"headline\":\"Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront\",\"datePublished\":\"2016-08-17T08:41:45+00:00\",\"dateModified\":\"2023-02-16T10:32:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/\"},\"wordCount\":790,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/08\/cloudfront.jpeg\",\"articleSection\":[\"Ruby on Rails\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/\",\"name\":\"Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/08\/cloudfront.jpeg\",\"datePublished\":\"2016-08-17T08:41:45+00:00\",\"dateModified\":\"2023-02-16T10:32:14+00:00\",\"author\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f\"},\"description\":\"CloudFront provides better interface instead of just showing the XML error, this could be helpful to non-techie users using ruby on rails.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#primaryimage\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/08\/cloudfront.jpeg\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/08\/cloudfront.jpeg\",\"width\":1280,\"height\":853,\"caption\":\"Discovering Amazon CloudFront\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.botreetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/\",\"name\":\"BoTree Technologies\",\"description\":\"Committed to inspire generation.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f\",\"name\":\"Parth Barot\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png\",\"caption\":\"Parth Barot\"},\"description\":\"Parth is the co-founder and CTO at BoTree Technologies. He has worked on building products in different domains and technologies. He is now managing research and pre-sales by supporting it with his problem-solving approach.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront","description":"CloudFront provides better interface instead of just showing the XML error, this could be helpful to non-techie users using ruby on rails.","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.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/","og_locale":"en_US","og_type":"article","og_title":"Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront","og_description":"CloudFront provides better interface instead of just showing the XML error, this could be helpful to non-techie users using ruby on rails.","og_url":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/","og_site_name":"BoTree Technologies","article_publisher":"https:\/\/www.facebook.com\/BoTreeTechnologies\/","article_published_time":"2016-08-17T08:41:45+00:00","article_modified_time":"2023-02-16T10:32:14+00:00","og_image":[{"width":1280,"height":853,"url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/08\/cloudfront.jpeg","type":"image\/jpeg"}],"author":"Parth Barot","twitter_card":"summary_large_image","twitter_creator":"@BoTreeTech","twitter_site":"@BoTreeTech","twitter_misc":{"Written by":"Parth Barot","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#article","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/"},"author":{"name":"Parth Barot","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f"},"headline":"Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront","datePublished":"2016-08-17T08:41:45+00:00","dateModified":"2023-02-16T10:32:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/"},"wordCount":790,"commentCount":0,"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/08\/cloudfront.jpeg","articleSection":["Ruby on Rails","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/","url":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/","name":"Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#primaryimage"},"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/08\/cloudfront.jpeg","datePublished":"2016-08-17T08:41:45+00:00","dateModified":"2023-02-16T10:32:14+00:00","author":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f"},"description":"CloudFront provides better interface instead of just showing the XML error, this could be helpful to non-techie users using ruby on rails.","breadcrumb":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#primaryimage","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/08\/cloudfront.jpeg","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/08\/cloudfront.jpeg","width":1280,"height":853,"caption":"Discovering Amazon CloudFront"},{"@type":"BreadcrumbList","@id":"https:\/\/www.botreetechnologies.com\/blog\/ruby-on-rails-discovering-amazon-cloudfront\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.botreetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Ruby on Rails\u200a-\u200aDiscovering Amazon CloudFront"}]},{"@type":"WebSite","@id":"https:\/\/www.botreetechnologies.com\/blog\/#website","url":"https:\/\/www.botreetechnologies.com\/blog\/","name":"BoTree Technologies","description":"Committed to inspire generation.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1952b3c6679346e5a2792581a67b1b0f","name":"Parth Barot","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/parth-barot-150x150.png","caption":"Parth Barot"},"description":"Parth is the co-founder and CTO at BoTree Technologies. He has worked on building products in different domains and technologies. He is now managing research and pre-sales by supporting it with his problem-solving approach."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=1942"}],"version-history":[{"count":5,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1942\/revisions"}],"predecessor-version":[{"id":18621,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/1942\/revisions\/18621"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media\/13949"}],"wp:attachment":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=1942"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=1942"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=1942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}