Next: , Previous: , Up: SDK for JavaScript Documentation   [Index]


Setting Up the SDK for JavaScript

https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up.html

The topics in this section explain how to install the SDK for JavaScript for use in web browsers and with Node.js. It also shows how to load the SDK so you can access the web services supported by the SDK.

Installing the SDK for JavaScript

The preferred way to install the AWS SDK for JavaScript for Node.js is to use npm:

npm install aws-sdk

In the event you see this error message:

npm WARN deprecated node-uuid@1.4.8: Use uuid module instead

Type these commands at the command line:

npm uninstall --save node-uuid
npm install --save uuid

Installing Using Bower

Bower is a package manager for the web. After you install Bower, you can use it to install the SDK. To install the SDK using Bower, type the following into a terminal window:

bower install aws-sdk-js

The Browser

You don’t have to install the SDK to use it in browser scripts. You can load the hosted SDK package directly from Amazon Web Services with a script in your HTML pages. The hosted SDK package supports the subset of AWS services that enforce cross-origin resource sharing (CORS). For more information, see Loading the SDK for JavaScript.

You can download minified and non-minified distributable versions of the current AWS SDK for JavaScript from GitHub at:

https://github.com/aws/aws-sdk-js/tree/master/dist