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 https://npmjs.org/package/aws-sdk. Once installed, you can load it into your code and configure it as follows:
AWS.config.update({
accessKeyId: 'ACCESS_KEY',
secretAccessKey: 'SECRET_KEY',
region: 'us-east-1'
});
Then you create a service interface object:
You can then use the object to make requests. Here's how you would upload a pair of objects into Amazon S3 concurrently:
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:
- AWS SDK for Node.js
- AWS SDK for Node.js Getting Started Guide
- AWS SDK for Node.js API Reference
- AWS SDK for Node.js on GitHub
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:


Hey guys,
Big congratulations from all of us who use AwsSum. :) Can't wait to see what you've got and how you've done it.
It'll also be good from the Node.js community that we have been officially recognised and I hope you get lots of people use both the aws-sdk and awssum. Let's make Node.js the best supported language for great API libraries.
Cheers,
Andy (creator of http://awssum.io/)
Posted by: Andrew Chilton | December 04, 2012 at 07:25 PM
Global state is generally frowned upon. I hope that config line is just a set of defaults, and that you can instantiate multiple clients with different credentials/regions in the same Node process. Yes? Yes.
Posted by: Mason | December 04, 2012 at 10:58 PM
Aha! Regarding my previous comment.... looks like the fact that Clients also accept credentials was left out of the Getting Started Guide, but is painfully obvious in the API docs.
Great job, team. :)
Posted by: Mason | December 04, 2012 at 11:04 PM
Is this library written following Common Modules specifications. It would be a shame to make this library only accessible to users of NodeJS. There are other server-side JavaScript developers out there on other implementations.
THat said, are there any specific NodeJS libraries needed to use these libraries?
Posted by: James Cook | December 05, 2012 at 06:10 AM
Love the recognition of Node, but could you please explain what makes this different from:
https://github.com/appsattic/node-awssum
or
https://github.com/LearnBoost/knox
Besides being the "official" Amazon package?
Posted by: Rob_raux | December 05, 2012 at 06:16 AM
What's the benefit of official AWS support for Node.js? Can you just load the Node.js package onto your own instance on your own?
Posted by: A. Non | December 05, 2012 at 07:33 AM
The "global" configuration is only a default configuration. You can construct clients with credentials/regions/config and these are merged with the default config. We'll try to point that out better in the getting started guide.
Posted by: Trevor Rowe | December 05, 2012 at 09:08 AM
Some of the benefits of the aws-sdk for Node.js:
* Retries errors (network, throttling, etc)
* Uses an exponential back-off retry strategy
* Modeled response data (type conversions, lists are always represented properly, property names are normalized, etc)
We are really excited to get this released to get community feedback. We will certain use this feedback to guide the direction of the SDK.
Posted by: Trevor Rowe | December 05, 2012 at 09:15 AM
Seriously, why don't you use the established node.js callback syntax?
Posted by: Martin | December 05, 2012 at 10:42 AM
Another huge benefit:
* The AWS SDK owners are generally pretty *awesome* about releasing SDK feature support as part of said feature's launch. It's great to be able to read about a new feature here, then immediately pull down the SDK and try it out.
Posted by: Mason | December 05, 2012 at 12:40 PM
aws-lib gives you support for almost all other AWS services except S3 and DynamoDB at the moment:
https://github.com/livelycode/aws-lib
Posted by: Mirkokiefer | December 05, 2012 at 11:52 PM
+1 on Martin's comment. It's a bit strange to not adhere to the established callback idiom for node APIs.
Posted by: Alon | December 07, 2012 at 09:41 AM
Glad to see Amazon reaching out to the node.js community! This will help our team a lot.
Posted by: Scrumlord | December 07, 2012 at 10:38 AM
Thanks for sharing this. It looks really promising.
One question pops up though: As far as I can see there's no streaming interface to S3. Am I missing something or wouldn't that be the obvious way to get/put files?
Posted by: Jonas | December 09, 2012 at 11:45 AM
Hi guys,
I've got a issue with the aws-sdk install on a ubuntu AMI
/wscript:15: error: The program ['xml2-config'] is required
After some research, i found the fix :
sudo apt-get install libxml2-dev
For sharing :)
Posted by: Fabien Delahousse | December 20, 2012 at 07:30 AM