AWS SDK for JavaScript v2

The legacy JavaScript SDK for calling AWS services like S3, DynamoDB, and EC2 from Node.js and the browser.

SDK
npm
v2.1693.0
7,603stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
59/100Fair
Development Activity0
Maintenance44
Community92
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
77/100Good
Architecture78
Code Quality68
Innovation62
Learning Curve100

aws-sdk is the original JavaScript SDK for Amazon Web Services, providing a unified client interface to virtually every AWS API — S3, DynamoDB, EC2, SQS, SNS, Lambda, and hundreds more — generated from the same JSON API models AWS uses internally. It ships pluggable credential providers, automatic retry/backoff, request signing, and both promise- and callback-based calling conventions, and runs in Node.js, the browser, and React Native from a single codebase.

Officially designated AWS SDK for JavaScript v2, this package reached end-of-support on September 8, 2025 and receives no further updates; AWS now directs new projects to the modular aws-sdk-js-v3 SDK. It remains published on npm and continues to be depended on by a very large body of existing Node.js applications that have not yet completed the v2-to-v3 migration.

What You Get

  • Full AWS API coverage - Generated clients for hundreds of AWS services (S3, DynamoDB, EC2, SQS, Lambda, and more) from AWS’s own JSON API models.
  • Unified request lifecycle - Every service call flows through the same build/sign/send/retry state machine, so signing (SigV4), retries, and pagination behave consistently across services.
  • Pluggable credential providers - Built-in support for environment variables, shared config files, EC2/ECS instance metadata, STS role assumption, and custom credential chains.
  • Cross-environment builds - Ships separate entry points for Node.js, browser (via browserify), and React Native from the same source tree.
  • Bundled TypeScript typings - Ships .d.ts definitions for every client and the core request/response types.

Common Use Cases

  • Legacy Node.js backend calling S3/DynamoDB - Teams with existing aws-sdk v2 integrations that upload/download objects or read/write DynamoDB tables without having migrated to v3 yet.
  • Browser apps using AWS Cognito credentials - Front-end code that authenticates via Cognito Identity and calls AWS services directly from the browser bundle.
  • Older Lambda functions bundling their own SDK - Functions written before Node.js 18-era Lambda runtimes stopped preinstalling aws-sdk v2, so it has to be bundled explicitly.
  • Migration audits - Codebases inventorying aws-sdk v2 call sites ahead of a v3 migration using AWS’s codemod tooling.

Under The Hood

Architecture The codebase is a monolith in packaging terms (roughly 300 generated services and ~774 client/typing files all in one npm package) but internally layered: per-service JSON models under apis/ are lazily registered through lib/api_loader.js and turned into client behavior at require-time, so lib/service.js’s abstract AWS.Service base class and every generated AWS.<ServiceName> constructor are almost entirely data-driven rather than hand-coded per service. Every API call, regardless of which service issued it, is executed by the same finite-state machine in lib/request.js (validate -> build -> afterBuild -> sign -> send -> retry -> afterRetry -> validateResponse -> extractData/extractError -> success/error -> complete), which centralizes signing, retry, and error propagation in one place. That centralization is also the architecture’s single point of failure: because every one of the ~300+ generated clients shares the same core request pipeline, a change to request.js or service.js has blast radius across the entire library rather than being scoped to one service.

Tech Stack The implementation is plain CommonJS JavaScript (ES5-oriented, using a prototype-based inherit() helper rather than ES6 classes), with a deliberately small runtime dependency set — buffer, events, ieee754, jmespath (for JMESPath query support), sax and xml2js (XML parsing), and uuid. Browser and React Native builds are produced via browserify with a custom transform plus webpack, and TypeScript 2.0.8 is used only to typecheck and ship the bundled .d.ts declaration files rather than as the implementation language. A Ruby toolchain (Rakefile, Gemfile) and leftover CoffeeScript in dist-tools/ reflect the project’s early-2010s origins. Testing spans Mocha and Chai for Node, Karma plus Jasmine for browser runs, and Cucumber/Gherkin feature files for higher-level integration scenarios.

Code Quality The test/ directory holds roughly a hundred .spec.js files exercising protocol marshalling, credential provider resolution, parameter validation, and request state-machine transitions, complemented by browser tests and Cucumber-driven integration features — an unusually broad test setup for a decade-old codebase. Error handling is centralized rather than ad hoc: AWS.util.error() decorates native Error objects and the request state machine explicitly funnels every failure through dedicated error/retry states instead of letting exceptions propagate unchecked. Style is enforced via a checked-in ESLint configuration, and CI runs through AWS CodeBuild (buildspec.yml) with Codecov coverage reporting. There is no source-level type safety, however — TypeScript is confined to the shipped type declarations, not the implementation — and the ES5-era conventions throughout now reflect a codebase that is frozen in place rather than actively maintained.

API Design Every AWS service exposes an identical calling convention — construct new AWS.<Service>(config), then call .operationName(params, callback) or chain .promise() — so the ergonomics learned on one client (say S3) transfer directly to all ~300+ others, backed by uniform parameter validation and consistent error shapes. Documentation is comprehensive and effectively auto-generated per operation from the underlying API models, and bundled TypeScript typings give IDE autocomplete for every operation without hand-authored type definitions. The cost of that consistency is boilerplate: juggling callback- and promise-based flows, manually wiring pagination and waiters, and pulling in one large, all-services-bundled package is heavier than the modular, tree-shakeable client-command pattern AWS SDK for JavaScript v3 replaced it with.

Used by 7 apps in this directory

Rust
53%
Other

Cap

Team Chat · Video Conferencing

21,859

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
64
Dependency
Built with
Rust53%
TypeScript43%
Updated yesterday
TypeScript
76%
Other

Joplin

Note Taking

56,257

The privacy-first, open-source note-taking app with end-to-end encrypted sync, AI assistance, and a powerful plugin ecosystem across every platform.

View details
93
Repo Health
87
Technical
61
Dependency
Built with
TypeScript76%
JavaScript14%
Updated yesterday
TypeScript
94%
AGPL 3.0

Laudspeaker

Marketing · Automation

2,620

Open-source customer engagement platform for building visual, event-triggered messaging journeys across email, SMS, push, in-app, and webhooks.

View details
51
Repo Health
66
Technical
62
Dependency
Built with
TypeScript94%
Updated 1 months ago
TypeScript
88%
MIT

Plasmic

CMS · Low Code Platforms · No Code Platforms

6,993

The open-source visual builder that lets teams design React apps and websites with drag-and-drop while integrating seamlessly with your codebase.

View details
81
Repo Health
78
Technical
64
Dependency
Built with
TypeScript88%
Updated yesterday
Python
54%
Other

PostHog

Analytics · Monitoring · Developer Tools

39,612

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python54%
TypeScript36%
Updated today
JavaScript
50%
AGPL 3.0

QRev

CRM · AI Agents

361

Open source AI-first sales platform that replaces Salesforce with autonomous agents handling prospecting, outreach, and lead management at scale.

View details
39
Repo Health
68
Technical
63
Dependency
Built with
JavaScript50%
Python28%
TypeScript14%
Updated 7 months ago
Vue
47%
AGPL 3.0

Wiki.js

Knowledge Management · Collaboration

28,848

A modern, self-hosted wiki platform built on Node.js with a rich plugin ecosystem for authentication, search, storage, and rendering that adapts to any team's infrastructure.

View details
72
Repo Health
67
Technical
60
Dependency
Built with
Vue47%
JavaScript42%
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