What Is the Amazon SDK for JavaScript? - Amazon SDK for JavaScript
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

The Amazon SDK for JavaScript version 3 (v3) is a rewrite of v2 with some great new features, including modular architecture. For more information, see the Amazon SDK for JavaScript v3 Developer Guide.

What Is the Amazon SDK for JavaScript?

The Amazon SDK for JavaScript provides a JavaScript API for Amazon services. You can use the JavaScript API to build libraries or applications for Node.js or the browser.


                Relationship between JavaScript environments, the SDK, and Amazon Web
                    Services

Not all services are immediately available in the SDK. To find out which services are currently supported by the Amazon SDK for JavaScript, see https://github.com/aws/aws-sdk-js/blob/master/SERVICES.md. For information about the SDK for JavaScript on GitHub, see Additional Resources.

Maintenance and support for SDK major versions

For information about maintenance and support for SDK major versions and their underlying dependencies, see the following in the Amazon SDKs and Tools Reference Guide:

Using the SDK with Node.js

Node.js is a cross-platform runtime for running server-side JavaScript applications. You can set up Node.js on an Amazon EC2 instance to run on a server. You can also use Node.js to write on-demand Amazon Lambda functions.

Using the SDK for Node.js differs from the way in which you use it for JavaScript in a web browser. The difference comes from the way in which you load the SDK and in how you obtain the credentials needed to access specific web services. When use of particular APIs differs between Node.js and the browser, those differences will be called out.

Using the SDK with Amazon Cloud9

You can also develop Node.js applications using the SDK for JavaScript in the Amazon Cloud9 IDE. For a sample of how to use Amazon Cloud9 for Node.js development, see Node.js Sample for Amazon Cloud9 in the Amazon Cloud9 User Guide. For more information on using Amazon Cloud9 with the SDK for JavaScript, see Using Amazon Cloud9 with the Amazon SDK for JavaScript.

Using the SDK with Amazon Amplify

For browser-based web, mobile, and hybrid apps, you can also use the Amazon Amplify Library on GitHub, which extends the SDK for JavaScript, providing a declarative interface.

Note

Frameworks such as Amazon Amplify might not offer the same browser support as the SDK for JavaScript. Check a framework's documentation for details.

Using the SDK with Web Browsers

All major web browsers support execution of JavaScript. JavaScript code that is running in a web browser is often called client-side JavaScript.

Using the SDK for JavaScript in a web browser differs from the way in which you use it for Node.js. The difference comes from the way in which you load the SDK and in how you obtain the credentials needed to access specific web services. When use of particular APIs differs between Node.js and the browser, those differences will be called out.

For a list of browsers that are supported by the Amazon SDK for JavaScript, see Web Browsers Supported.

Common Use Cases

Using the SDK for JavaScript in browser scripts makes it possible to realize a number of compelling use cases. Here are several ideas for things you can build in a browser application by using the SDK for JavaScript to access various web services.

  • Build a custom console to Amazon services in which you access and combine features across Regions and services to best meet your organizational or project needs.

  • Use Amazon Cognito Identity to enable authenticated user access to your browser applications and websites, including use of third-party authentication from Facebook and others.

  • Use Amazon Kinesis to process click streams or other marketing data in real time.

  • Use Amazon DynamoDB for serverless data persistence such as individual user preferences for website visitors or application users.

  • Use Amazon Lambda to encapsulate proprietary logic that you can invoke from browser scripts without downloading and revealing your intellectual property to users.

About the Examples

You can browse the SDK for JavaScript examples in the Amazon Code Sample Catalog.