AWS SDK for Node.js

Get started quickly using AWS with the AWS SDK for Node.js. The SDK helps take the complexity out of coding by providing JavaScript objects for AWS services including Amazon S3, Amazon EC2, DynamoDB, and Amazon SWF. The single, downloadable package includes the AWS JavaScript Library and documentation.

Download

or Install using npm

npm install aws-sdk

Get Started Fast

  1. Install

    npm install aws-sdk
  2. Configure

    1. Create a JSON document containing the AWS credentials
    2. { "accessKeyId": "akid", "secretAccessKey": "secret", "region": "us-west-2" }
    3. Load the file
    4. AWS.config.loadFromPath('./config.json');

    The Getting Started Guide covers other means to load credentials.

  3. Run

    var AWS = require('aws-sdk');
    var s3 = new AWS.S3();
    
    s3.createBucket({Bucket: 'myBucket'}, function() {
      var params = {Bucket: 'myBucket', Key: 'myKey', Body: 'Hello!'};
      s3.putObject(params, function(err, data) {
        if (err)
          console.log(err)
        else
          console.log("Successfully uploaded data to myBucket/myKey");
      });
    });

Supported Services


Additional Resources