sigv4-lite
AWS SigV4 signing for runtimes without Node’s crypto module — Cloudflare Workers, Deno, Bun, browsers. Works with S3, R2, B2, Wasabi, and any other SigV4-compatible endpoint.
Zero dependencies. Uses Web Crypto (crypto.subtle) only.
By ProfessionalFlare.
Install
Section titled “Install”npm install sigv4-liteQuick start
Section titled “Quick start”import { signRequest } from "sigv4-lite";
const headers = await signRequest({ method: "PUT", url: "https://my-bucket.s3.amazonaws.com/file.txt", body: "hello world", accessKeyId: env.ACCESS_KEY_ID, secretAccessKey: env.SECRET_ACCESS_KEY, region: "us-east-1",});
await fetch("https://my-bucket.s3.amazonaws.com/file.txt", { method: "PUT", headers, body: "hello world",});See API for the full reference and Examples for a Cloudflare Worker + R2 walkthrough.