amazon-cloudfront

CloudFront redirect request with Lambda to trailing slash

时间秒杀一切 提交于 2020-08-26 08:13:37
问题 I have a static SPA page that is using S3 as it's origin with CloudFront. If I visit www.domain.com/page, I will get the CloudFront path prefixed bucket-directory/prod/page/ which is expected. Is it possible to capture the path in AWS Lambda and append the trailing slash to a request, so it becomes, www.domain.com/page > [Lambda] > www.domain.com/page/ I've been looking and trying the following resources to little avail: http://blog.rowanudell.com/redirects-in-serverless/ http://docs.aws

CloudFront redirect request with Lambda to trailing slash

一曲冷凌霜 提交于 2020-08-26 08:10:21
问题 I have a static SPA page that is using S3 as it's origin with CloudFront. If I visit www.domain.com/page, I will get the CloudFront path prefixed bucket-directory/prod/page/ which is expected. Is it possible to capture the path in AWS Lambda and append the trailing slash to a request, so it becomes, www.domain.com/page > [Lambda] > www.domain.com/page/ I've been looking and trying the following resources to little avail: http://blog.rowanudell.com/redirects-in-serverless/ http://docs.aws

Missing Authentication Token Error with CloudFront & API Gateway

依然范特西╮ 提交于 2020-08-24 08:21:07
问题 I have setup a CloudFront Distribution with an API Gateway as one of the origins and this API Gateway is configured with an AWS IAM authorizer. When CloudFront url is invoked with Authorization headers, it returns a 403 error. { "message": "Missing Authentication Token" } However, when the API Gateway url is invoked instead of CloudFront url with the same Authorization headers, it worked. I've also tried invoking the endpoint without any authorizer via CloudFront url and it worked. Any idea

Missing Authentication Token Error with CloudFront & API Gateway

梦想的初衷 提交于 2020-08-24 08:17:57
问题 I have setup a CloudFront Distribution with an API Gateway as one of the origins and this API Gateway is configured with an AWS IAM authorizer. When CloudFront url is invoked with Authorization headers, it returns a 403 error. { "message": "Missing Authentication Token" } However, when the API Gateway url is invoked instead of CloudFront url with the same Authorization headers, it worked. I've also tried invoking the endpoint without any authorizer via CloudFront url and it worked. Any idea

Missing Authentication Token Error with CloudFront & API Gateway

我们两清 提交于 2020-08-24 08:17:49
问题 I have setup a CloudFront Distribution with an API Gateway as one of the origins and this API Gateway is configured with an AWS IAM authorizer. When CloudFront url is invoked with Authorization headers, it returns a 403 error. { "message": "Missing Authentication Token" } However, when the API Gateway url is invoked instead of CloudFront url with the same Authorization headers, it worked. I've also tried invoking the endpoint without any authorizer via CloudFront url and it worked. Any idea

Update Angular app on AWS S3 + Cloudfront

こ雲淡風輕ζ 提交于 2020-08-09 19:06:48
问题 I deployed a production Angular 9 application on S3 + cloudfront. It works very well but I've some problems every time I release a new update of the application. I read many articles: https://medium.com/@sumn2u/react-progressive-web-app-s3-and-cloudfront-6c890fa873fb https://medium.com/driven-by-code/on-the-importance-of-correct-headers-and-metadata-in-s3-origins-for-aws-cloudfront-50da2f9370ae I set right caching for index.html and ngsw-worker.js so they are not cached from cloudFront. Every

Update Angular app on AWS S3 + Cloudfront

若如初见. 提交于 2020-08-09 19:06:03
问题 I deployed a production Angular 9 application on S3 + cloudfront. It works very well but I've some problems every time I release a new update of the application. I read many articles: https://medium.com/@sumn2u/react-progressive-web-app-s3-and-cloudfront-6c890fa873fb https://medium.com/driven-by-code/on-the-importance-of-correct-headers-and-metadata-in-s3-origins-for-aws-cloudfront-50da2f9370ae I set right caching for index.html and ngsw-worker.js so they are not cached from cloudFront. Every