Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding S3 Endpoint Config Option #170

Merged
merged 4 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/controllers/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ function S3(serviceOptions) {
} else {
var aws = require('aws-sdk');
aws.config.update({
region: serviceOptions.region
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
if (serviceOptions.accessKeyId) {
Expand Down
3 changes: 3 additions & 0 deletions serverconfig.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down