amazon-cloudfront

How to upload video to S3 via CloudFront using C# HttpClient or AWS SDK

牧云@^-^@ 提交于 2019-12-12 03:49:07
问题 I'm trying to upload files (Images & Video) to an AWS CloudFront distribution, that points to an s3 bucket. Currently, I can use the HttpClient to GET and PUT files using signed URLs generated via the CloudFront SDK. using (HttpClient client = new HttpClient()) using (var stream = File.OpenRead(filepath)) using (HttpResponseMessage response = await client.PutAsync(url, new StreamContent(stream))) { response.EnsureSuccessStatusCode(); } I originally tried a POST, but this didn't work at all

Completely fake URL with .htaccess

Deadly 提交于 2019-12-12 02:54:53
问题 I am serving static content with Amazon CloudFront and am using my servers as the origin. Since CF does not respect ? query strings, I can't easily force CF to use new versions of .png files. I also need fast invalidation and do not want to pay for invalidation requests. So I want to create a completely fake directory with .htaccess to force versioning for my images. For instance, I want: domain.com/static/0.12/images/background.png going to domain.com/static/images/background.png Where 0.12

Why does CloudFront deliver sequential connections that cancel out? Img inside

廉价感情. 提交于 2019-12-11 20:49:27
问题 We are using signed URLs to deliver some video content. When browsing directly to the signed URL, looking at the network profiler, you can see the URL being connected to 4 times. Why is it doing this? The screen shot below was a brand new, generated link so in no way was this file cached. The reason I am even to this point is cloudFront has been extremely slow to load videos for us the past week. The video in the screen shot is an hour and a half and it takes about 20-30 seconds to begin

Rails Cloudfront assets not served

你说的曾经没有我的故事 提交于 2019-12-11 19:06:13
问题 I set-up Cloudfront with Heroku for Rails and in the beginning it worked fine. I noticed in the last days that the assets are not served from cloudfront.net any longer. Production.rb Rails.application.configure do config.cache_classes = true config.eager_load = true config.consider_all_requests_local = false config.action_controller.perform_caching = true config.action_controller.asset_host = 'http://d2t6o5tnu5etuf.cloudfront.net' config.serve_static_files = true config.assets.js_compressor =

What is the maximum expiration time for CloudFront signed url

梦想与她 提交于 2019-12-11 18:56:25
问题 I'm using CloudFront for generating signed URL from this doc what is the maximum expiration time for CloudFront signed URL? How should I mention on this DateLessThan argument Sample Code snippet String signedUrlCanned = CloudFrontService.signUrlCanned( "http://" + distributionDomain + "/" + s3ObjectKey, // Resource URL or Path keyPairId, // Certificate identifier, // an active trusted signer for the distribution derPrivateKey, // DER Private key data ServiceUtils.parseIso8601Date("2011-11

Amazon CloudFront URL issue

南楼画角 提交于 2019-12-11 18:00:52
问题 I use Amazon CloudFront to provide my frontend. My backend runs on Amazon EC2. I assigned CloutFront a domain of its own and set the CNAME entry. In my backend I added the new domain as allowed origin host. But now I get crossorigin error messages. Why might that be? 回答1: Make sure you have following setup: Make a curl directly on EC2 with Origin header and see if you get the CORS response. (For OPTIONs requests to) OPTIONS requests are allowed on CloudFront. Origin header Whitelisted on

How to serve static web content from S3 backed by multiple buckets from different regions

三世轮回 提交于 2019-12-11 17:18:06
问题 I'm trying to serve static web content (HTML, CSS, and JS files) from S3 buckets. I know I can go to the bucket's properties tab and choose the item Use this bucket to host a website from the Static website hosting box. And I'm sure this step will still be part of the solution I'm looking for but it won't be all. Here's what I'm trying to accomplish: Deploying the same content to multiple regions and based on availability and/or latency, provide the service to the client. As for the API

Running multiple Spring Boot apps in a single EC2 instance

六月ゝ 毕业季﹏ 提交于 2019-12-11 16:14:04
问题 I am trying to deploy multiple spring boot web applications with embedded tomcat in a single EC2 instance. With an embedded tomcat (I prefer to decouple my apps runtime), each one of these apps should be running on a different port (let's say 8081, 8082 and 8083). For each of these apps I would like to point a domain: app1.domaine.com should point to APP1 running on 8081 app2.domaine.com should point to APP2 running on 8082 app3.domaine.com should point to APP3 running on 8083 Do you think it

Connecting a SSL cert to a CloudFront CDN in CloudFormation

血红的双手。 提交于 2019-12-11 14:40:10
问题 So far I have this to create the resources. "staticFileBucketPolicy": { "Type": "AWS::S3::BucketPolicy", "DependsOn": "staticFileBucket", "Properties": { "Bucket": { "Ref": "staticFileBucket" }, "PolicyDocument": { "Version": "2012-10-17", "Statement": [{ "Sid": "AddPerm", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": { "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "staticFileBucket" } , "/*" ]]} }] } } }, "certificate": { "Type": "AWS::CertificateManager:

AWS - InvalidAccessKeyId returned when accessing S3 bucket via CloudFront HTTPS distribution

…衆ロ難τιáo~ 提交于 2019-12-11 12:58:45
问题 Previous question on the same case. After solving my previous issue, my AWS is set up with the following services. S3 bucket in ap-east-1 without static website hosting. CloudFront HTTPS distribution with a SSL certificate requested from ACM in us-east-1 . Alias pointing to the CloudFront distribution in Route 53 . When I try navigating to the distribution endpoint using the alias configured in Route 53 , it always returns InvalidAccessKeyId error, and saying that the access key does not