aws4fetch

Compact AWS Signature V4 client built on fetch and SubtleCrypto for edge and browser runtimes

SDK
npm
v1.0.20
879stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
38/100Needs Attention
Development Activity0
Maintenance20
Community44
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
77/100Good
Architecture72
Code Quality75
Innovation78
Learning Curve82

aws4fetch is a minimal (6.4kb minified, 2.5kb gzipped) AWS API client for JavaScript environments that support the standard fetch and SubtleCrypto APIs — modern browsers and edge platforms like Cloudflare Workers where the full AWS SDK’s Node.js dependencies (streams, Buffer, crypto module) aren’t available. It exports AwsClient, a drop-in wrapper around fetch that signs every request with AWS Signature Version 4 before sending it, and AwsV4Signer, the lower-level signer for callers who want the signed method/url/headers/body without an opinionated fetch call.

Because it targets any AWS service reachable over its REST/JSON HTTP APIs rather than one specific service, it works for Lambda invocation, S3 object access, DynamoDB, and anything else with a documented AWS endpoint, with automatic retries using exponential backoff with full jitter built in by default.

What You Get

  • AwsClient, a fetch-compatible wrapper (aws.fetch(url, init)) that transparently signs requests with AWS SigV4
  • AwsV4Signer, a lower-level signer returning the signed method/url/headers/body for manual fetch() calls
  • Automatic retries with exponential backoff and full jitter, configurable via retries/initRetryMs
  • Support for query-string signing (signQuery) as an alternative to the Authorization header
  • Works against any AWS REST/JSON HTTP endpoint (Lambda, S3, DynamoDB, IoT, etc.) since service/region are inferred from the URL at fetch time

Common Use Cases

  • Calling AWS services (Lambda, S3, DynamoDB) directly from a Cloudflare Worker or other edge function without bundling the full AWS SDK
  • Signing AWS API requests from a browser-based tool where Node.js crypto/stream polyfills aren’t practical
  • Replacing API Gateway with a lightweight signed proxy to AWS services from an edge script
  • Invoking AWS Lambda functions or accessing S3 objects from serverless functions with minimal bundle size overhead

Under The Hood

Architecture - The entire client lives in a single 441-line file, src/main.js, which exports the two public classes: AwsClient (a thin fetch-signing wrapper with retry logic) and AwsV4Signer (the core canonical-request builder and signature calculator implementing the AWS SigV4 algorithm — canonical request, string to sign, and derived signing key via HMAC-SHA256). Service and region are parsed from the target URL’s hostname at call time by default, avoiding any AWS-specific configuration beyond credentials. Tech Stack - Zero runtime dependencies; it relies entirely on Web-standard APIs (fetch, Headers, Request, URL, crypto.subtle) available in browsers, Cloudflare Workers, Deno, and modern Node.js, which is what keeps the bundle at roughly 6.4kb minified. The build is produced via Rollup (rollup.config.mjs) into CJS, ESM, and UMD bundles plus TypeScript declaration files, and an example/ directory demonstrates a Cloudflare Worker used as an API Gateway replacement. Code Quality - The test/ directory includes dedicated suites for signing parameters, AWS-specific behaviors, and per-service quirks (paramTests.js, awsTests.js, serviceTests.js), plus CommonJS/ESM interop smoke tests (node-commonjs.js, node-es.mjs) and an integration test — solid coverage for a security-sensitive signing implementation given the package’s small size. Development has slowed since 2024 (activity_status: inactive), but the surface area is narrow and the SigV4 algorithm itself doesn’t change, so quiescence here is less concerning than for a rapidly-evolving library. API Design - The API mirrors the standard fetch signature almost exactly (aws.fetch(url, init)), with AWS-specific overrides nested under an aws: {...} key in init, so existing fetch-based code needs minimal changes to adopt it; AwsV4Signer is offered separately for consumers who want to construct and send the Request themselves.

Used by 10 apps in this directory

Rust
67%
MIT

Bun

Developer Tools

95,452

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
66
Dependency
Built with
Rust67%
C++19%
Updated today
TypeScript
97%
Apache 2.0

Cline

AI Code Assistants

66,453

An open-source AI coding agent that lives in your editor and terminal — reads and edits your codebase, runs commands, browses the web, and requires human approval for every action by default.

View details
90
Repo Health
74
Technical
67
Dependency
Built with
TypeScript97%
Updated today
TypeScript
100%
Other

Dub

Marketing · Analytics

24,521

The open-source link attribution platform for short links, conversion tracking, and affiliate programs — powering 100M+ clicks monthly.

View details
81
Repo Health
78
Technical
65
Dependency
Built with
TypeScript100%
Updated today
TypeScript
72%
Other

Epicenter

Knowledge Management · Note Taking · Developer Tools

4,761

A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.

View details
88
Repo Health
90
Technical
68
Dependency
Built with
TypeScript72%
Svelte15%
Updated today
MDX
50%
Apache 2.0

Formizee

Forms Surveys

183

An open-source form backend and builder platform — design forms, collect submissions, and get analytics without hosting your own server, positioned as an alternative to Formspree and Typeform.

View details
28
Repo Health
59
Technical
68
Dependency
Built with
MDX50%
TypeScript49%
Updated 1 years ago
TypeScript
91%
Apache 2.0

Helicone

Monitoring · AI Development · Analytics

6,083

An open-source AI gateway and LLM observability platform that routes requests to 100+ models while logging cost, latency, and full traces for every call.

View details
62
Repo Health
81
Technical
66
Dependency
Built with
TypeScript91%
Updated 3 days ago
TypeScript
67%
MIT

Hoppscotch

Developer Tools

80,055

A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.

View details
91
Repo Health
83
Technical
66
Dependency
Built with
TypeScript67%
Vue23%
Updated 3 days ago
TypeScript
76%
MIT

OpenCode

AI Code Assistants

198,979

A fully open-source AI coding agent built for the terminal, with a TUI, desktop app, web client, plugin system, and SDK — one of the most-starred AI coding agents on GitHub.

View details
89
Repo Health
76
Technical
68
Dependency
Built with
TypeScript76%
MDX21%
Updated today
TypeScript
99%
Apache 2.0

Trigger.dev

Automation · AI Development · Developer Tools

16,062

Build and deploy fully-managed AI agents and background jobs in TypeScript — with no timeouts, durable retries, real-time observability, and elastic scaling built in.

View details
90
Repo Health
9
Technical
65
Dependency
Built with
TypeScript99%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search