{"id":16675079,"url":"https://github.com/nicekiwi/lowdb-adapter-aws-s3","last_synced_at":"2025-10-15T00:09:42.843Z","repository":{"id":27024151,"uuid":"112117206","full_name":"nicekiwi/lowdb-adapter-aws-s3","owner":"nicekiwi","description":"Amazon S3 Adapter for LowDB","archived":false,"fork":false,"pushed_at":"2022-12-06T20:40:35.000Z","size":647,"stargazers_count":11,"open_issues_count":12,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T01:05:38.701Z","etag":null,"topics":["aws-s3","javascript","lowdb","nodejs-modules"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicekiwi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-26T21:14:47.000Z","updated_at":"2025-02-11T15:49:55.000Z","dependencies_parsed_at":"2023-01-14T05:49:54.115Z","dependency_job_id":null,"html_url":"https://github.com/nicekiwi/lowdb-adapter-aws-s3","commit_stats":null,"previous_names":["nicekiwi/lowdb-aws-s3-adapter"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicekiwi%2Flowdb-adapter-aws-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicekiwi%2Flowdb-adapter-aws-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicekiwi%2Flowdb-adapter-aws-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicekiwi%2Flowdb-adapter-aws-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicekiwi","download_url":"https://codeload.github.com/nicekiwi/lowdb-adapter-aws-s3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248105284,"owners_count":21048497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-s3","javascript","lowdb","nodejs-modules"],"created_at":"2024-10-12T12:45:25.705Z","updated_at":"2025-10-15T00:09:42.758Z","avatar_url":"https://github.com/nicekiwi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS S3 Adapter for LowDB\n\n[![Build Status](https://travis-ci.org/nicekiwi/lowdb-adapter-aws-s3.svg?branch=master)](https://travis-ci.org/nicekiwi/lowdb-adapter-aws-s3) [![npm version](https://badge.fury.io/js/lowdb-adapter-aws-s3.svg)](https://badge.fury.io/js/lowdb-adapter-aws-s3)\n\nThis adapter allows you to create and use a lowDB source located on AWS S3 Storage. \n\nSupports Node.JS \u003e= 4.0.0, Electron and the Browser.\n\n#### In active development, not Production ready.\n\n## Why?\n\nCause AWS is amazeballs.. and I can't afford a MongoDB server. :P\n\n## Installation\n\n`npm i --save lowdb-adapter-aws-s3`\n\n## Usage\n\n```\n// Grab the deps\nconst lowDB = require('lowdb')\nconst AwsAdapter = require('lowdb-adapter-aws-s3')\n\n// Init the adapter\nconst adapter = new AwsAdapter()\n\n// Go hard!\nlowDB(adapter)\n\n  // Defaults FTW\n  .then(db =\u003e db.defaults({ posts: [], user: {} }).write())\n\n  // Push something awesome\n  .then(db =\u003e db.get('posts').push({ id: 1, title: 'lowdb is awesome'}).write())\n\n  // Profit!\n  .then(db =\u003e console.log('Victory!'))\n```\n\n## Configuration\n\n`const adapter = new AwsAdapter('db.json', options)`\n\n#### Constructor Options\n\nThe constructor uses the same options as lowDB itself, and can be passed `defaultValue`, `serialize` and `deserialize`.\n\nHowever, this module introduces a new paramater: `aws` which contains the options to connect and write to AWS S3.\n\n#### AWS Options\n\n| Param | Type | Default | Description | \n| --- | --- | --- | --- |\n| contentType | String | 'application/json' | The MimeType of the source file. |\n| bucketName | String | 'lowdb-data' | The name of the S3 bucket to write to. |\n| acl | String | 'private' | The AWS access control settings for the source file. |\n| cognitoCredentials | null | Object | The Object containing `CognitoIdentityCredentials` options (only required when using in the browser or Electron). |\n\nWhen using server-side AWS credentials should be set via the ENV, and will be picked up by AWS automattically. \n\n```\nAWS_ACCESS_KEY_ID = null\nAWS_SECRET_ACCESS_KEY = null\n```\n\nWhen using in the browser or Electron, you should (probably) be using an AWS [CognitoIdentityCredentials](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityCredentials.html#constructor-property) object, all you need to do is pass the options to the `cognitoCredentials` option in the `aws` options.\n\nThe `AWS.CognitoIdentityCredentials` object will be automatically created for you from the options you pass to the `cognitoCredentials` paramater. Easy peasy.\n\nExample:\n\n```\nconst adapter = new AwsAdapter('db.json', {\n  aws: {\n    cognitoCredentials: {\n      IdentityPoolId: 'us-east-2:1699ebc0-7900-4099-b910-2df94f52a030,\n      ...\n    },\n    ...\n  }\n})\n```\n\n## Tests\n\n`npm test`\n\n## Caveat\n\nObviously as read/write calls are made on-demand to AWS this is not a fast adapter, MongoDB would be a better choice for such Need for Speed. \n\n## Future\n\n* Support bucket/file encryption\n* Some kind of in-memory caching to speed up read times\n\n## Other Projects using Low-Adapter-AWS-S3\n\n* https://github.com/pharindoko/json-server-less-lambda\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicekiwi%2Flowdb-adapter-aws-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicekiwi%2Flowdb-adapter-aws-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicekiwi%2Flowdb-adapter-aws-s3/lists"}