I\'m uploading file to S3 using aws-sdk package:
fs.readFile(sourceFile, function (err, data) {
if (err) { throw err; }
s3.client.putObject({
Bu
The following works like a charm. (Note the ACL key in params)
const params = {
Bucket: bucketName + path,
Key: key,
Body: buffer,
ContentEncoding: 'base64',
ContentType: 'image/jpeg',
ACL:'public-read'
};
await s3.putObject(params).promise();
Note: IAM permission "s3:PutObjectACL" must be included in the appropriate policy otherwise you will get Access Denied errors.