Пример node.js public read file #236
Tested on linux and node.js 11

1)$ node --version
v11.15.0

2)$ npm init

3)$ npm install aws-sdk

4) create file index.js with following content:

const AWS = require('aws-sdk')

var storage = new AWS.S3({
    accessKeyId: "Q1HDU7MLKD03QLGLLQPX",
    secretAccessKey: "eZaXdDCbnu2z0bZtdokB8AVxcAAXDuNhoeON7agt",
    endpoint: new AWS.Endpoint("https://s3.pilw.io"),
    params: {
        Bucket: "example"
    }
})

var params = {
    Key: 'text.txt',
    Body: 'Hello world!',
    ACL: 'public-read'
}

storage.upload(params, function(err, data) {
    if (err) {
        throw err
    }
    console.log(`File uploaded successfully. ${data.Location}`)
})

5)$ node index.js 

output: 
File uploaded successfully. https://example.s3.pilw.io/text.txt