0

I am asking this question for educational purposes. I have hosted my static assets on S3 with Cloud front. I want to apply brotli and gzip compression during the build process.

As per articles available on various platforms It is possible to add content-type and intercept S3 origin requests using Lambda@edge. But Lambda@edge is available with region US-east so it is not available to our region.

So is it possible to check the browser's compatible compression on the client-side when we are adding scripts for static assets?

Only solution I could find online is: Can JavaScript detect if the user's browser supports gzip?

Always_a_learner
  • 4,585
  • 13
  • 63
  • 112

1 Answers1

1

Edge Lambdas are always in us-east-1. For example: If your bucket is in paris, your cloudfront will always be global and your Lambda@edge too. In the Console it's located in us-east-1.

Christian Haller
  • 643
  • 1
  • 7
  • 16