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

@distilled.cloud/s3

v1.0.0-rc.20

Published

Effect-native Amazon S3 client for AWS and every S3-compatible store (Cloudflare R2, Tigris, MinIO, ...), with the restXml, SigV4 and endpoint-rules runtime it needs and nothing else. The base of @distilled.cloud/aws.

Readme

@distilled.cloud/s3

Effect-native Amazon S3 client, generated from AWS's Smithy model with exhaustive error typing. It works with AWS S3 and every S3-compatible store: Cloudflare R2, Tigris, MinIO, Backblaze B2, Railway and Fly.io buckets.

The package holds the S3 client and only the runtime it needs: the restXml protocol, SigV4 signing (@distilled.cloud/aws4signer), endpoint rules and checksums. It reads no environment variable and no file, and it has no credential providers. About 2.4 MB installed.

Installation

npm install @distilled.cloud/s3 effect

Use it with your own keys

Provide Credentials with the keys, and Endpoint for a store other than AWS:

import * as S3 from "@distilled.cloud/s3";
import { Credentials } from "@distilled.cloud/s3/Credentials";
import { Endpoint } from "@distilled.cloud/s3/Endpoint";
import * as Effect from "effect/Effect";
import * as FetchHttpClient from "effect/http/FetchHttpClient";
import * as Layer from "effect/Layer";
import * as Redacted from "effect/Redacted";

const program = Effect.gen(function* () {
  yield* S3.putObject({ Bucket: "my-bucket", Key: "hello.txt", Body: "Hello!" });
  const { Contents } = yield* S3.listObjectsV2({ Bucket: "my-bucket" });
  return Contents?.map((object) => object.Key);
}).pipe(
  // A bucket that does not exist fails with a typed error you can catch.
  Effect.catchTag("NoSuchBucket", () => Effect.succeed([])),
);

const MinIO = Layer.mergeAll(
  FetchHttpClient.layer,
  Layer.succeed(Endpoint, Effect.succeed("http://localhost:9000")),
  Layer.succeed(
    Credentials,
    Effect.succeed({
      accessKeyId: Redacted.make(accessKeyId),
      secretAccessKey: Redacted.make(secretAccessKey),
      sessionToken: undefined,
      // The region the keys sign for.
      region: "us-east-1",
    }),
  ),
);

program.pipe(Effect.provide(MinIO), Effect.runPromise);

Use it through another distilled SDK

An SDK that already holds credentials provides the layer:

  • AWS: @distilled.cloud/aws's credential providers (Credentials.fromChain(), fromSSO, fromEnv, ...) provide this package's Credentials. @distilled.cloud/aws/s3 re-exports this package.
  • Cloudflare R2: R2.layerS3() from @distilled.cloud/cloudflare/r2 turns the Cloudflare API token in the Cloudflare Credentials into R2 S3 keys, and points Endpoint at the account's R2 endpoint. The account is the credentials' accountId (CLOUDFLARE_ACCOUNT_ID), or the one account the token reaches. Buckets in another jurisdiction: provide Jurisdiction.of("eu") from @distilled.cloud/cloudflare/Jurisdiction.
import * as Cloudflare from "@distilled.cloud/cloudflare/Credentials";
import * as R2 from "@distilled.cloud/cloudflare/r2";

const R2Live = R2.layerS3().pipe(
  Layer.provideMerge(Layer.mergeAll(Cloudflare.fromEnv(), FetchHttpClient.layer)),
);

program.pipe(Effect.provide(R2Live), Effect.runPromise);

A layer that can fail adds its errors to every operation's error type (see ProviderErrors in @distilled.cloud/s3/Credentials), so a program that only passes keys sees none of them.

Generated code

src/services/s3.ts is generated by packages/aws/scripts/generate.ts from the AWS spec mirror, with the patches in packages/aws/patches/s3.json. Regenerate it with pnpm generate aws.

License

Apache-2.0