About this project
AWS SDK for JavaScript v3 is a rewrite of version 2 that keeps the goal of working with Amazon Web Services while changing the packaging and internal architecture. Instead of one large SDK, it is split into modular packages, with a separate package for each service, so applications can import only what they use. It also adds first-class TypeScript support and a new middleware stack.
Getting started follows a familiar pattern: create a Node.js project, add a service package such as @aws-sdk/client-dynamodb, then instantiate a client and send a command. The README shows both the modular style (DynamoDBClient plus ListTablesCommand and client.send) and a non-modular, v2-like style (DynamoDB with client.listTables). It notes that the non-modular interface increases bundle size when tree shaking is used. For React Native, it lists required polyfills for random values, URL handling, and web streams, and mentions enabling package exports support in Metro.
Key changes from v2 include the removal of a global SDK configuration object; configuration is now passed to each client instance, though it can still be shared manually. Request lifecycle handling moves from event listeners to a middleware stack, where each middleware calls the next and can be added with a name, step, and override option. The README links to an UPGRADING.md for a full breakdown of API changes.
High-level concepts covered include bare-bones clients and commands versus aggregated clients, generated code layout, streams, paginators, and the abort controller. Generated service clients live under /clients and are produced with smithy-typescript; shared utility code lives in /packages; higher-level wrappers such as lib-dynamodb and lib-storage live in /lib. Stream outputs receive mixin methods like transformToString, which read the stream once and cannot be called repeatedly. Paginators expose async generator functions such as paginateListTables, usable with for await...of. The AbortController interface allows requests to be aborted.
The README also discusses Lambda usage, recommending one SDK client per service and region initialized outside the handler, with API calls made inside the handler to avoid signing time skew. It points to performance documentation and notes improved cold-start behavior on Node 18. It explains installing from source by cloning, building with yarn, packing an individual client, and installing the resulting archive. Feedback channels include GitHub issues and a Gitter chat, and contributions are accepted under the Apache 2.0 license. The document also references release cadence, Node.js and ECMAScript support policy, TypeScript version support policy, stability of modular packages, and known issues such as functionality requiring the AWS Common Runtime.
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.