AWS Developer Tools Blog

Modular AWS SDK for JavaScript – Release Candidate

As of December 15th, 2020, the AWS SDK for JavaScript, version 3 (v3) is generally available.

We’re happy to announce the Release Candidate (RC) of the AWS SDK for JavaScript, version 3 (v3). This RC follows the Developer preview release of the JavaScript SDK. It is a major rewrite of the version 2.x code base, and adds frequently requested features, like modularized packages, a new middleware stack and first-class TypeScript support. We also added many other features, which we are planning to cover in detail in future blog posts:

  • Utility functions to operate with JavaScript objects in DynamoDB.
  • Extensive logging support to record metadata and HTTP request/response.
  • Pagination using async generators.
  • Higher order operation for multipart upload.
  • Bi-directional transcribe streaming over WebSockets.
  • Support for HTTP/2.
  • New retry behavior with congestion control to accommodate throttling responses, and retry quotas to limit the number of failed retries.

Overview

This Release Candidate contains breaking changes from Developer Preview release. As we move close to general availability, we will avoid breaking changes unless absolutely necessary.

Minimum Node.js supported version is now 10.x

On December 31st, 2019 Node.js 8.x reached End of Life (EOL). We have therefore updated the minimum requirements for AWS SDK for JavaScript version 3 to Node.js 10.x. If you are currently using Node.js 8.x with JavaScript SDK Developer Preview release, please upgrade and refer to the Node.js 10.x release announcement for notable changes.

Single client package for all supported runtimes

The Developer Preview contained separate browser and Node.js packages for clients:

// import Node.js version
const { DynamoDB } = require("@aws-sdk/client-dynamodb-node");
// import web version
const { DynamoDB } = require("@aws-sdk/client-dynamodb-browser");

The motivation was separation of concerns between the runtime specific Node.js and browser dependencies, especially different types for Streams. However, we found that shipping multiple packages per basic client unnecessarily complicates user adoption. It is also difficult to build high-level libraries based on diverged types.

In the Release Candidate we introduced a single package per client for all supported runtimes, i.e. Node.js, browser and react-native:

const { DynamoDB } = require("@aws-sdk/client-dynamodb");

You can install this package by running the following command:

npm install @aws-sdk/client-dynamodb

The runtime-specific dependencies are resolved internally at the time of the client instantiation, ensuring separation of concerns.

Resources

To get started with JavaScript SDK version 3 Release Candidate, visit our Developer Guide or API Reference.

You can also visit our self-guided workshop, which builds a simple note taking application using JavaScript SDK version 2 and provides step-by-step migration instructions to version 3. To test your isomorphic JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.

We value your feedback, so please tell us what you like and don’t like by opening an issue on GitHub!

Trivikram Kamat

Trivikram Kamat

Trivikram is maintainer of AWS SDK for JavaScript in Node.js and browser. Trivikram is also a Node.js Core collaborator and have contributed to HTTP, HTTP/2 and HTTP/3 over QUIC implementations in the past. He has been writing JavaScript for over a decade. You can find him on Twitter @trivikram and GitHub @trivikr.