amazon-cloudfront

Slow performance when generating CloudFront Signed URLs

笑着哭i 提交于 2019-12-12 17:31:24
问题 I'm following this sample to create Signed URLs on CloudFront using PHP http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CreateURL_PHP.html And I have everything working fine and generating the Signed URLs for both RTMP Distributions and HTTP Distributions. However I noticed that generating the Sign URL takes quite some time and I wonder what impact could have when used in production with thousands of requests. I did some tests and it seems that the long time is taking is due

AWS CloudFront, `Vary` header and content negotiation

放肆的年华 提交于 2019-12-12 15:22:06
问题 I'm trying to implement content negotiation based on client Accept headers so that clients that accept image/webp get webp images while clients that don't get plain old jpeg. webp and jpeg image are served from the same url, i.e. /images/foo-image/ and the content returned varies on the Accept header presented by the client. This now works great on my site. Next challenge is to get this working AWS CloudFront sitting in front of my site. I'm setting the Vary header to Vary: Accept to let

Image Fetch issues in Pinterest and Twitter from Amazon CloudFront

[亡魂溺海] 提交于 2019-12-12 14:38:14
问题 I have got a server which points to AWS ec2. - domain:-hometriangle.com And the Images are getting served from AWS CloudFront with SSL which internally points to ec2.: domain:-static.hometriangle.com Both Pinterest and Twitter are not able to fetch images. Whereas Facebook and Google are handling it well. Twitter errors:I get following logs in Card Validator > INFO: Page fetched successfully INFO: 22 metatags were found INFO: > twitter:card = gallery tag found ERROR: Internal Proxy Image

How to use AWS WAF with Application ELB

偶尔善良 提交于 2019-12-12 09:43:21
问题 I need to use AWS WAF for my web application hosted on AWS to provide additional rule based security to it. I couldnt find any way to directly use WAF with ELB and WAF needs Cloudfront to add WEB ACL to block actions based on rules. So, I added my Application ELB CNAME to cloudfront, only the domain name, WebACL with an IP block rule and HTTPS protocol was updated with cloudfront. Rest all has been left default. once both WAF and Cloudfront with ELB CNAME was added, i tried to access the

Laravel and AWS Cloudfront

扶醉桌前 提交于 2019-12-12 08:46:41
问题 I was researching and read a lot of articles on one specific topic but couldn't find relevant answers anywhere. However I'm doing some things as a fun/private project in Laravel and I wanted to use Amazon S3 storage. I have everything set up, and it's working, I'm able to upload images to S3 from my application using Laravel Filesystem, but what I'm trying to do is use CloudFront (I have this set up and working too, the cloudfront is serving files properly) for serving images and files. Now

how to secure s3 files with trusted signed users using cloudfront aws-sign?

雨燕双飞 提交于 2019-12-12 05:36:54
问题 I need to secure my files which should not get directly played or downloaded in the browzer after copy pasting the link in the browzer. Below is my app.js file: var express = require('express'), aws = require('aws-sdk'), bodyParser = require('body-parser'), multer = require('multer'), multerS3 = require('multer-s3'); var cfUtil = require('aws-cloudfront-sign'); /**************************/ var cfPk = '-----BEGIN RSA PRIVATE KEY-----\n' +

AWS CloudFront Access-Control-Allow-Origin and Signed Cookie/Urls

空扰寡人 提交于 2019-12-12 05:20:40
问题 I'm stuck with a CORS at S3+Cloudfront+Signed Urls. My use cases is: First story (successful): I have an Amazon S3 bucket with a Cloudfront. Files are accessible by the DOMAIN1/file link I write a simple test JS script to get file from DOMAIN1 and put it at the DOMAIN2/test.html I'm able to get file successfully. CORS is fine . Second case (successful too): I restrict Cloud Front distribution by using Signed Url. At first I tried is to access a file at DOMAIN1 without Signature. Got an Access

Cloudfront signed cookies issue, getting 403

帅比萌擦擦* 提交于 2019-12-12 04:54:31
问题 We have used CloudFront to store image URLs and using signed cookies to provide access only through our application. Without signed cookies we are able to access contents but after enabling signed cookies we are getting HTTP 403. Below is configuration/cookies we are sending: Cookies going with the request: CloudFront-Expires: 1522454400 CloudFront-Key-Pair-Id: xyz... CloudFront-Policy: abcde... CloudFront-Signature: abce... Here is our CloudFront policy: { "Statement": [ { "Resource":"https:

Unable to connect to Cloudfront from MacOSX client

放肆的年华 提交于 2019-12-12 04:49:30
问题 My multi-platform client, written in C++ and built on cURL , should download a file from Cloudfront. On Windows, the download works fine with libcurl 7.40.0 and OpenSSL 1.0.2c . On MacOSX: the file served via "direct" Amazon AWS link is correctly downloaded; the file served via Cloudfront link cannot be downloaded: CURL error after the call is set to CURLE_SSL_CONNECT_ERROR , and debug informations show that the protocol breaks during SSL handshake. The file is correctly downloaded also via

amazon cloudfront Error “AccessDenied”

浪子不回头ぞ 提交于 2019-12-12 04:33:30
问题 This is my code i am getting Access Denied message. Anyone tell me how to fix this. My Bucket Policy "cloudfront:user/CloudFront Origin Access Identity [ID]" with s3. Bucket Policy Resource "Resource": "arn:aws:s3:::bucket_name/*" use Aws\CloudFront\CloudFrontClient; require 'vendor/autoload.php'; $cloudFront = CloudFrontClient::factory([ 'version' => 'latest', 'region' => 'ap-south-1' ]); // Setup parameter values for the resource $streamHostUrl = 'http://example.cloudfront.net';