Simple S3 DB
A simple key value pair API which stores values within S3.
Usage
npm install simple-s3-db
const SimpleS3DB = ;const AWS = ; const db = 'my-bucket-name' ;
Put
db ;
Putting Objects in a Folder
To place an object in a folder simply delimit the folder with
/
in your object key.
db ;
Get
db ;
Result Object
- data:
object
what was put in the first place
Delete
db ;
Deleting Multiple Objects
You can delete multiple objects at once by passing an array of keys. This is particularly useful in conjunction with the list operation below.
db ;
List
db ;
Result Object
- data:
array<string>
array of object keys contained in the folder
Getting All the Things in a Folder
The general pattern for getting all the objects in a folder is to list the folder and then map the list to the objects.
db ;