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.
Get Started Fast
-
Install
npm install aws-sdk
-
Configure
- Create a JSON document containing the AWS credentials
- Load the file
{ "accessKeyId": "akid", "secretAccessKey": "secret", "region": "us-west-2" }AWS.config.loadFromPath('./config.json');The Getting Started Guide covers other means to load credentials.
-
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
Compute & Networking
Storage & Content Delivery
Additional Resources
- Connect with other developers in the JavaScript Community Forum »
- Discover more about using JavaScript with AWS in the JavaScript Developer Center »
- Learn the details of the latest SDK in the Release Notes »
- Dig through the source code in the GitHub Repository »