Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ Allows you to prefix your keys if you want all of your snapshots to live in a sp

default: none

#### AWS_ENDPOINT_URL

Use of a S3 endpoint URL different from the default one.

`export AWS_ENDPOINT_URL=s3.domain.tld`

default: s3.amazonaws.com

## License

The MIT License (MIT)
Expand Down
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
var s3 = new (require('aws-sdk')).S3({params:{Bucket: process.env.S3_BUCKET_NAME}});
const AWS = require('aws-sdk');

let options = {params:{Bucket: process.env.S3_BUCKET_NAME}};
if (process.env.AWS_ENDPOINT_URL) {
let ep = new AWS.Endpoint(process.env.AWS_ENDPOINT_URL);
options.endpoint = ep;
}
let s3 = new AWS.S3(options);

module.exports = {

Expand Down