get downloadable link to s3 bucket object js

JavaScript
s3.getSignedUrl('getObject', {
  Bucket: bucketName,
  Key: fileKey,
  ResponseContentDisposition: `attachment; filename="${fileName}"`,
  Expires: 60 * 5,
});
Source

Also in JavaScript: