简体   繁体   中英

S3 access private bucket files

I have gone through all the existing questions doesn't seems to be fullfill my requirements.

I have a S3 private bucket with 10000 files, Privately accessing via Nodejs server to display in my angular application atleast 25 per page.

I found multiple solutions those seems Inefficient to my thoughts.

  • Generate pre-signed urls for files.
  • Pulls the image via the Nodejs API from S3

To display 10 or more need to generate signed Url's each time which is a time consuming process. And pulling image via api using s3.getObject method gives me a Buffer data converting it to a Base64 is hard to handle at the client side and fetching each consumes time this too.

Are these any solutions out there which I'm not aware of and how this can be implemented without affecting user experience.

PS: My Bucket is private not public

Have you tried signed cookies ?

I think this may help you by just considering AWS CloudFront and signed the cookie one time to let the client access any file(s) directly after that.

There is some reference.

Also, CloudFront will give you more benefits such as optimize the access speed, attach SSL Certificates to your S3 buckets, and more.

"Sorry for my English"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM