diff --git a/lib/controllers/share.js b/lib/controllers/share.js index d19e4ca..9eb698d 100644 --- a/lib/controllers/share.js +++ b/lib/controllers/share.js @@ -83,6 +83,7 @@ function S3(serviceOptions) { } else { var aws = require('aws-sdk'); aws.config.update({ + endpoint: serviceOptions.endpoint ?? undefined, region: serviceOptions.region }); // if no credentials provided, we assume that they're being provided as environment variables or in a file diff --git a/serverconfig.json.example b/serverconfig.json.example index 8576a14..d55894e 100644 --- a/serverconfig.json.example +++ b/serverconfig.json.example @@ -141,6 +141,9 @@ // Required: an existing S3 bucket in which to store objects "bucket": "terria-sharedata" + // Optional: pass through custom S3 endpoint which will utilise the above region. + "endpoint": "https://{region}.your.custom.s3.endpoint.com", + // Optional: The access key ID and secret access key of a user with S3 getObject and putObject permission on the above bucket // If not provided here, you must ensure they're available as environment variables or in a shared credentials file. // See http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html