You can use the aws-sdk to fetch an object and pipe its body directly to the response.
Your backend server uses its own AWS IAM credentials to access S3; the end-user never sees AWS-related details. Example Implementation (Node.js & Express) rest api to download s3 file
In this pattern, your REST API acts as a middleman. The client requests a file from your server, your server fetches it from S3, and then streams the data back to the client. You can use the aws-sdk to fetch an
Building a REST API to download files from AWS S3 is a common task for developers needing to serve private cloud storage assets to web or mobile clients. Depending on your security requirements and file sizes, there are two primary architectural patterns to consider: and Presigned URLs . 1. The Direct Proxy Pattern (Streaming) The client requests a file from your server,
Small files (under 10MB) or when you need to hide the S3 source entirely.