AWS SDK for Node.js
The official JavaScript implementation of the AWS SDK for Node.js.
Installing
To use the AWS SDK for Node.js, you must have an AWS account. If you do not yet have an AWS
account, see
AWS Account and Credentials (p. 2)
for instructions on how to sign up.
The preferred way to install the AWS SDK for Node.js is to use the
npm
package manager for Node.js.
Simply type the following into a terminal window:
npm install aws-sdk
Note
Installing the
aws-sdk
npm package on Windows may display errors while trying to install the
optional dependency for
libxmljs
. This error can be safely ignored.
Usage
After you've installed the SDK, you can require the AWS package in your node application using
require
:
var AWS = require('aws-sdk');
Here is a quick example that makes some requests against Amazon S3 with the SDK:
// Load the AWS SDK for Node.js
var AWS = require('aws-sdk');
/**
* Don't hard-code your credentials!
Version 0.9.1-pre.2 : Preview
1
AWS SDK for Node.js Getting Started Guide
Installing