amazon-cloudfront

Rails asset_host, cloudfront and heroku

此生再无相见时 提交于 2019-12-10 22:41:54
问题 I'm running a rails 4.0 app on heroku and for the life of me I can't get my asset urls using the host I've set in asset_host. I believe my cloudfront setup is good because I can substitute in my cloudfront url for any of my asset urls and the file is picked up from heroku and cached on cloudfront. So https://xxxxxxxxxxxx.cloudfront.net/assets/application-xxxxxxxx.js is caching https://myapp.com/assets/application-xxxxxxxxx.js correctly. The issue seems to be my assets helper, such as

Accept-Encoding headers on Cloudfront serving assets from Rails 3.0.x on Heroku Cedar

时间秒杀一切 提交于 2019-12-10 16:29:48
问题 When I use my Rails app to directly serve my assets through Heroku's Cedar stack (ie. NOT through a CDN) they get gzip'd automatically. (See my previous question on why I'm confused about this) Now, I'm trying to set up Cloudfront to serve these assets instead, and ideally, I'd like for them to be gzip'd as well. From what I've read, I thought that Cloudfront would pass on the Accept headers to my app, so they should be served up gzip'd if supported (just as they are when you make a direct

Amazon AWS CloudFront claims no such bucket exists

烂漫一生 提交于 2019-12-10 16:24:12
问题 I'm trying to set up CloudFront to serve images, but accessing it currently does not work and returns the error "The specified bucket does not exist." <Error> <Code>NoSuchBucket</Code> <Message>The specified bucket does not exist</Message> <BucketName>someBucketName</BucketName> <RequestId>irrelevant</RequestId> <HostId> irrelevant </HostId> </Error> CloudFront requires you to use a domain to host rather than a url as the base. That domain is .s3.amazonaws.com, which is supposed to be

Get CloudFront custom domain in the headers of a request

柔情痞子 提交于 2019-12-10 11:15:04
问题 I have a CloudFront distribution abcd1234.cloudfront.net and I've added a custom domain of mysite.com to the distribution. The CloudFront distribution's origin: aaabbbccc.execute-api.us-east-1.amazonaws.com When I load the page mysite.com/hello/world , CloudFront is then consuming API Gateway aaabbbccc.execute-api.us-east-1.amazonaws.com/prod/{proxy+} the API Gateway path endpoint is invoking a Lambda Function that calls a function like getPageContent(customDomainName, pagePath) which should

How to put object to S3 via CloudFront

删除回忆录丶 提交于 2019-12-10 10:54:01
问题 I'd like to upload image to S3 via CloudFront. If you see the document about CloudFront, you can find that cloud front offers put method for uploading to cloudFront There could be someone to ask me why i use the cloud front for uploading to S3 If you search out about that, you can find the solution What i wanna ask is whether there is method in SDK for uploading to cloud front or not As you know , there is method "putObejct" for uploading directly to S3 but i can't find for uploading cloud

Intermittent 403 CORS Errors (Access-Control-Allow-Origin) With Cloudfront Using Signed URLs To GET S3 Objects

一世执手 提交于 2019-12-09 19:00:30
问题 In Brief In order to keep the uploaded media (S3 objects) private for all the clients on my multi-tenant system I implemented a Cloudfront CDN deployment and configured it (and its Origin S3 Bucket) to force the use of signed URLs in order to GET any of the objects. The Method First, the user is authenticated via my system, and then a signed URL is generated and returned to them using the AWS.CloudFront.Signer.getSignedUrl() method provided by the AWS JS SDK. so they can make the call to CF

Does API Gateway behind CloudFront not support AWS_IAM authentication?

我们两清 提交于 2019-12-09 14:38:21
问题 It seems that it is impossible to call a REST API that has AWS_IAM protection enabled through a CloudFront Distribution. Here is how to reproduce this: create a REST API with API Gateway protect a REST API method with AWS_IAM authentication create a CloudFront Distribution that targets the REST API create an A Record in Route 53 that targets the CloudFront Distribution Now use an authenticated user (I use Cognito UserPool user and aws-amplify) to call the protected REST API method with its

S3 hosted website Cloudfront distribution and API Gateway custom domain pointing to the same subdomain

爱⌒轻易说出口 提交于 2019-12-09 13:53:23
问题 I have a subdomain for my website named api.example.com and I want to have the following achieved: have 1 CloudFront distribution for an S3 static website mapped to api.example.com have the API Gateway custom domain name mapped to the same subdomain api.example.com The steps I did to achieve this setup are: Create an API Gateway custom domain api.example.com and set the base mappings for the APIs I want to expose as v1 (version 1 for now) In Route 53 I created a CNAME record api.example.com

Serve protected assets through CDN

僤鯓⒐⒋嵵緔 提交于 2019-12-09 09:07:01
问题 We want to serve a lot of video files from few available AWS regions. The target audience comes from multiple locations around the globe. The connection speed is not guaranteed. So a CDN (preferably CloudFront) is absolutely required. The videos need to be protected, so they can only be played if the user is authenticated and authorized to see these videos. Obviously the logic of who can see what and when is a part of the application. Streaming the videos from the origin would be unacceptably

Firefox does not render fonts from CloudFront

蓝咒 提交于 2019-12-09 09:06:49
问题 I have a Rails app, hosted on Heroku . During deployment assets are synced with an Amazon S3 bucket via the asset_sync gem and views call those assets through CloudFront . However, fonts are not rendered when viewing the website with Firefox (files are loaded in the Net tab of Firebug, but simply not used). Safari works great. I have the following CORS config on S3: <?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule>