Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serve S3 resources via http/2

Our web app that we are building is having a lot of its assets served via S3. When looking at them in Chrome they are being served via HTTP and not http/2.

Is there a config setting in S3 or a header that we could pass that would tell S3 to attempt to serve assets via http/2 if the client supports it?

I'm having issues finding any resources online about how to do this or if it's even possible.

like image 656
Jared Avatar asked Aug 02 '17 21:08

Jared


People also ask

Does S3 support HTTP 2?

I was looking for such feature too but it seems that AWS S3 do not have HTTP2 support yet.

Does AWS support HTTP 2?

End-to-end HTTP/2 and gRPC Support is available today for new and existing Application Load Balancers in all regions. You can use this feature via the console, AWS Command Line Interface (CLI), AWS SDKs.

Does CloudFront support HTTP2?

We are pleased to announce that you can now enable HTTP/2 for your Amazon CloudFront distributions to improve the performance of your web content delivered to clients that support the new HTTP/2 protocol. HTTP/2 is a major revision of the HTTP protocol.

Does S3 use HTTP or HTTPS?

Amazon S3 allows both HTTP and HTTPS requests. By default, requests are made through the AWS Management Console, AWS Command Line Interface (AWS CLI), or HTTPS. To comply with the s3-bucket-ssl-requests-only rule, confirm that your bucket policies explicitly deny access to HTTP requests.


1 Answers

  1. Serve via CloudFront, there is a manual in the article

    New – HTTP/2 Support for Amazon CloudFront

  2. Serve via your own proxy. Nginx configuration for such magic is deeply explained here:

    Nginx proxy Amazon S3 resources

In both options you should have SSL certificate generated for the domain you use to serve resources from S3.

like image 196
iXCray Avatar answered Sep 18 '22 18:09

iXCray