'Stream file from S3 without downloading locally
Is it possible stream a zip file through a Java (spring boot) service from Amazon S3 without having to actually download the whole file in the service?
For context, imagine having a large file in S3 (in gigs), that you want to let your users download it, but you want to authorize those users before giving them access to the file, without making the bucket or the object publicly available.
One way to do this, is to download the file in your java service, then send it in the response. But if the file is too big, the disk space sometime will not be enough.
Thus the question, is there a way to somehow stream the file from S3 (the java service would act as a sort of proxy) to the client, without actually downloading it.
PS: I am aware of the other alternative would use short-lived pre-signed URLs
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|