s3-proxy
s3-proxy copied to clipboard
AWS endpoint configuration
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.
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
}));
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.