Get started quickly using AWS with the AWS SDK for JavaScript in 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.

AWS SDK for JavaScript »

or Install using npm

npm install aws-sdk

npm install aws-sdk

Create a credentials file at ~/.aws/credentials on Mac/Linux or C:\Users\USERNAME\.aws\credentials on Windows


aws_access_key_id = your_access_key

aws_secret_access_key = your_secret_key

The Getting Started Guide covers other means to load credentials.

Bucket names can contain lowercase letters, numbers, and hyphens. Each label must start and end with a lowercase letter or a number.

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

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 »