How do you download a file from AWS S3 to a client's device?

S3 supports the ability to generate a pre-signed URL via the AWS Javascript API. Users can then GET this URL to download the S3 object to their local device.

See this question for a Node.js code sample.


you can use SignedURL Like that

var params = {Bucket: bucketname , Key: keyfile , Expires: 3600 , ResponseContentDisposition :  `attachment; filename="filename.ext"` };
var url = s3.getSignedUrl('getObject', params);

the generated link will force download with the name filename.ext