s3-proxy icon indicating copy to clipboard operation
s3-proxy copied to clipboard

AWS endpoint configuration

Open djromberg opened this issue 5 years ago • 2 comments

I am having troube configuring the endpoint of the S3 storage. I thought it should be possible by passing a config object during import: s3Proxy = require('s3-proxy')({endpoint: process.env.AWS_ENDPOINT}); However, this seems not to be forwarded to the final module definition function. I am not sure whether this is a bug or whether I miss something, but would be thankful for some help. I need this to use a different S3 compatible storage service.

djromberg avatar Mar 20 '19 17:03 djromberg

I was able to get this to work against my local minio install. I'm sure you've long ago gotten past this but for what it's worth:

app.get('*', s3Proxy({
    endpoint: 'https://minio.mydomain.dev:443',
    bucket: 'audible-dump',
    accessKeyId: 'asdfasdf',
    secretAccessKey: 'asdfasdfasdf',
    s3ForcePathStyle: true
  }));

oliverkane avatar Nov 10 '20 00:11 oliverkane

To circle back on this one. The s3ForcePathStyle is a feature that you'll need for almost all S3 related services. Newer AWS datacenters use a different format, involving a hostname prefix (my-bucket.whateveraws.com) whereas before they would use a path-suffix (whateveraws.com/my-bucket). Minio for example requires this setting.

I think this old ticket can be closed. This appears to work as expect.

oliverkane avatar Nov 17 '20 00:11 oliverkane