Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nginx to serve downloadable S3 files

I want to serve downloadable files from S3 through Nginx to internal people.

I tried rufuspollock/s3-bucket-listing, which worked perfectly. But it need bucket to be public. I don't want to make bucket public.

Is there any other way to do this possible ?

like image 235
roy Avatar asked Jul 10 '19 17:07

roy


People also ask

Does S3 use nginx?

You can use both NGINX Open Source and NGINX Plus as the gateway to S3 or a compatible object store. To use NGINX Open Source, start with the official NGINX image from Docker Hub and the Dockerfile we provide on GitHub.

Why is downloading from S3 so slow?

Large object size For very large Amazon S3 objects, you might notice slow download times as your web browser tries to download the entire object. Instead, try downloading large objects with a ranged GET request using the Amazon S3 API.

Can I read S3 file without downloading?

Reading objects without downloading them Similarly, if you want to upload and read small pieces of textual data such as quotes, tweets, or news articles, you can do that using the S3 resource method put(), as demonstrated in the example below (Gist).


1 Answers

This will not work the way you expect. Reason being the endpoints will return XML, so what you need is a web interface which then interfaces with S3 and provides you a folder like interface.

Below thread has a lot of interesting options you can explore

Directory Listing in S3 Static Website

like image 57
Tarun Lalwani Avatar answered Nov 15 '22 11:11

Tarun Lalwani