awslabs/aws-js-s3-explorer

Question: is there a way to specify service endpoint (endpoint URL)?

tomers opened this issue · 5 comments

Question: is there a way to specify service endpoint (endpoint URL)?

This capability is not present in the existing code, for the sake of simplicity for the most common use cases, but you could investigate enhancing your own fork of the code, for example to change the following code:

var s3 = new AWS.S3();

to:

var s3 = new AWS.S3({endpoint: 'https://newendpoint'});

@john-aws

Are you saying AWS.S3 already accepts an endpoint parameter, and the change is simple ... or that AWS.S3 class could be re-factored to add that feature (somewhat less simple)?

For what it's worth, consider this another S3 user -- with a hybrid application where an on-premise S3-compatible service is the "front end", and AWS/S3 provides redundant offsite storage.

cheers (& thanks),
s.h.

Ok, apologies for being lazy ... i see endpoint is an option to the constructor.

Follow-up:
Any experience (i.e. difficulty estimate) in using a non-AWS endpoint ?

thanks (again),
s.h.

Any experience (i.e. difficulty estimate) in using a non-AWS endpoint ?

Unfortunately not. It will depend on the level of API compatibility of the S3 emulation, I would think. Easy to do a quick test, if you have such an endpoint. Interested to hear your progress, if you go that route.

You can simply run moto docker (https://github.com/spulec/moto) locally, and there you could set endpoint URL to be http://moto:5000.