Skip to content

Instantly share code, notes, and snippets.

@spolat
Created May 5, 2020 21:30
Show Gist options
  • Save spolat/70e1ca0c8c91a3617effa7d3bb4a4bf4 to your computer and use it in GitHub Desktop.
Save spolat/70e1ca0c8c91a3617effa7d3bb4a4bf4 to your computer and use it in GitHub Desktop.
use admin;
db.runCommand( { "storageSetConfig": {
"stores": [{
"name": "mdb-dl-example", // Creates an S3 store
"provider": "s3", // Specifies the provider
"region":"eu-west-1", // Update with the bucket region code
"bucket": "md-dl-example" // Update with your bucket name
}],
"databases": [{
"name": "sample", // Creates a database named sample
"collections": [{
"name": "*", // Creates a collection for each directory //
"dataSources": [{
"storeName": "mdb-dl-example", // Links to the S3 store above
"path": "/movie_dataset/{collectionName()}"
}]
}]
}]
}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment