AWS Official Blog

AWS SDK for Node.js – Now Available in Preview Form

by Jeff Barr | on | in Developer Tools, JavaScript | | Comments

The AWS Developer Tools Team focuses on delivering the developer tools and SDKs that are a good fit for today’s languages and programming environments.

Today we are announcing support for the JavaScript language in the Node.js environment — the new AWS SDK for Node.js.

Node.js gives you the power to write  server-side applications in JavaScript. It uses an event-driven non-blocking I/O model to allow your applications to scale while keeping you from having to deal with threads, polling, timeouts, and event loops. You can, for example, initiate and manage parallel calls to several web services in a clean and obvious fashion.

The SDK is available as an npm (Node Packaged Module) at Once installed, you can load it into your code and configure it as follows:

var AWS = require ( ‘aws-sdk’ ) ;

  accessKeyId: ‘ACCESS_KEY’,
  secretAccessKey: ‘SECRET_KEY’,
  region: ‘us-east-1′

Then you create a service interface object:

var s3 = new AWS. S3 ( ) ;

You can then use the object to make requests. Here’s how you would upload a pair of objects into Amazon S3 concurrently:

var params1 = {Bucket : ‘myBucket’ , Key : ‘myKey1′ , Body : ‘Hello!’ } ;
var params2 = {Bucket : ‘myBucket’ , Key : ‘myKey2′ , Body : ‘World!’ } ;

s3.client.putObject(params1).done(function(resp) {
  console.log(“Successfully uploaded data to myBucket/myKey1″);

s3.client.putObject(params2).done(function(resp) {
  console.log(“Successfully uploaded data to myBucket/myKey2″);

The SDK supports Amazon S3, Amazon EC2, Amazon DynamoDB, and the Amazon Simple Workflow Service, with support for additional services on the drawing board.

Here are some links to get you going:

Give it a shot and let me know what you think!

— Jeff;

PS – The AWS Developer Tools Team is hiring! Here are some of their openings: