# lincd-s3

> A general purpose Simple Storage Service (S3) package to be extended or used as is

Latest version **1.0.1** (published 2025-12-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install lincd-s3
pnpm add lincd-s3
yarn add lincd-s3
bun add lincd-s3
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2025-12-02 |
| First published | 2023-09-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 9 |
| Unpacked size | 149 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Valentine Wilson |
| Maintainers | rene_reborn |
| Keywords | lincd, linked data, interoperable, semantic web, web3, s3, simple storage service, cloud storage, aws |

## Links

- npm: https://www.npmjs.com/package/lincd-s3
- npm.io page: https://npm.io/package/lincd-s3

## Dependencies (9)

- [cron](https://npm.io/package/cron.md) ^3.1.7
- [mime](https://npm.io/package/mime.md) 2.6.0
- [lincd](https://npm.io/package/lincd.md) ^1.0
- [lincd-jsonld](https://npm.io/package/lincd-jsonld.md) ~1.0
- [lincd-server](https://npm.io/package/lincd-server.md) ~1.0
- [@aws-sdk/client-s3](https://npm.io/package/@aws-sdk/client-s3.md) ^3.159.0
- [lincd-jsonld-store](https://npm.io/package/lincd-jsonld-store.md) ~1.0
- [lincd-server-utils](https://npm.io/package/lincd-server-utils.md) ~1.0
- [@aws-sdk/credential-providers](https://npm.io/package/@aws-sdk/credential-providers.md) ^3.159.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2025-12-02
- 1.0.0 — 2024-05-30
- 0.1.2 — 2023-09-16
- 0.1.1 — 2023-09-16

## README

# lincd-s3

A plug-n-play solution for using an S3 Bucket in LINCD.

In place of your usual backend store, you can use the following to get started with S3:

```ts
// ...
const { LinkedFileStorage } = require('lincd/lib/utils/LinkedFileStorage');
const { LinkedStorage } = require('lincd/lib/utils/LinkedStorage');
const { S3QuadStore } = require('lincd-s3/lib/shapes/S3QuadStore');
const { S3FileStore } = require('lincd-s3/lib/shapes/S3FileStore');

// This translates to be the Object name in the bucket. If no object
// is found with this name, then one will be created - just like how a
// regular NodeFileStore works!
const QUADSTORE_NAME = 'foo-bar-data';
const s3Quads = new S3QuadStore(QUADSTORE_NAME);

LinkedStorage.setDefaultStore(s3Quads);

// Set up an S3 Filestore
const FILESTORE_NAME = 'baz-qux-files';
const s3Files = new S3FileStore(FILESTORE_NAME);

LinkedFileStorage.setDefaultStore(s3Files);
// ...
```

## Environment Variables

Unless stated otherwise, the following environment variables are required:

```properties
# Generated using whatever service is hosting your bucket
AWS_ACCESS_KEY_ID=ABC123XYZ789
AWS_SECRET_ACCESS_KEY=aBc123Def456xYz789

# The endpoint on which your bucket resides. It's important to note that
# this is the HOST address of your bucket - i.e. it SHOULDN'T contain
# your bucket name!!
S3_BUCKET_ENDPOINT=https://my.bucket-provider.com

# The name of your buckets
S3_FILES_BUCKET_NAME=my-file-bucket
S3_QUADS_BUCKET_NAME=my-data-bucket

# OPTIONAL: If using a CDN, you can specify the URL here and it will be used
S3_CDN_URL=https://my.cdn-provider.com
```

The S3 client will automagically form the correct URL for your bucket - in this case it would
be https://my-data-bucket.my.bucket-provider.com or https://my-file-bucket.my.bucket-provider.com

## See also:

- [lincd-filebase](https://www.npmjs.com/package/lincd-filebase) - An implementation
  for [filebase](https://filebase.com) IPFS bucket storage

---
_Source: https://npm.io/package/lincd-s3 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
