npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vincecao/s3db

v0.1.5

Published

Transform AWS S3 into a simple, scalable document database for efficient storage and retrieval of JSON-like documents.

Readme

S3DB - Simple S3 Database

npm version npm checks

Transform AWS S3 into a simple document database that offers scalable storage for JSON-like documents.

While S3 is suitable for certain use cases, it's important to consider whether it meets the needs of your application compared to traditional document databases. This library can be beneficial for scenarios like content management systems and web applications, but keep in mind that S3 is primarily an object storage service, which may not provide the same level of querying capabilities and performance as a dedicated document database.

Use this library for managing collections of documents with CRUD operations efficiently, but evaluate your requirements carefully to ensure S3 is the right choice for your data storage needs.

Installation

This package is automatically published in both NPMJS and GITHUB npm registry.

# Install latest package from npm.js
pnpm i @vincecao/s3db
# or npm i ...
# or yarn add ...


# Install beta package
pnpm i @vincecao/s3db@beta
# or npm i ...
# or yarn add ...

To install package from Github npm registry, add below file in your repo before run npm i or yarn add.

# .npmrc
@vincecao:registry=https://npm.pkg.github.com

You can also install directly from current repo master

pnpm i vincecao/s3db
# or pnpm i github:vincecao/s3db
# or npm i ...
# or yarn add ...

Basic Usage

  1. Initialize the database with your AWS credentials and bucket/collection names. Ensure that you have the correct permissions set in your S3 bucket to allow read and write operations. The following permissions should be enabled at the bucket level:
    • s3:ListBucket for listing objects in the bucket.
    • s3:GetObject for reading objects from the bucket.
    • s3:PutObject for writing objects to the bucket.
import S3db, { getS3dbConfig } from "@vincecao/s3db";

// Option 1: Use environment variables
// Ensure these are set in your environment:
// S3_DB_REGION = "your-region"
// S3_DB_ACCESS_KEY_ID = "your-access-key"
// S3_DB_SECRET_ACCESS_KEY = "your-secret-key"

// Option 2: Pass config directly
const config = {
  awsRegion: "your-region",
  awsAccessKeyId: "your-access-key",
  awsSecretAccessKey: "your-secret-key",
};

// Initialize the database
const db = await S3db.initialize({
  s3ClientConfig: getS3dbConfig(config), // or getS3dbConfig() for env vars
  bucketName: "your-bucket-name",
  collectionName: "your-collection-name",
});
  1. Perform CRUD operations:
// Create/Update document
const id = await db.uploadDBDocument({
  title: "Example",
  content: "This is a test document",
});

// Read document
const document = await db.getDBDocumentData(id);

// Get all document IDs
const ids = await db.getDBDocumentIds();

// Delete document
await db.deleteDBDocumentById(id);

Development Commands

# Build the project
pnpm run build

# Publish new version
npm login
npm publish

License

MIT License