EasyManuals Logo

Amazon AWS SDK User Manual

Amazon AWS SDK
19 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #18 background imageLoading...
Page #18 background image
Examples
All of these examples assume that the AWS library is required, credentials are loaded via environment
variables (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY), and the region is set via
AWS.config.update({region: 'us-east-1'});.
The common preamble code can be summarized as follows:
var AWS = require('aws-sdk');
AWS.config.update({region: 'us-east-1'});
Amazon Simple Storage Service (Amazon S3)
Amazon S3: List All of Your Buckets (listBuckets)
The following example lists all buckets associated with your AWS account:
var s3 = new AWS.S3();
s3.client.listBuckets(function(err, data) {
for (var index in data.Buckets) {
var bucket = data.Buckets[index];
console.log("Bucket: ", bucket.Name, ' : ', bucket.CreationDate);
}
});
Amazon S3: Create a New Bucket and Object
(createBucket, putObject)
The following example puts the string 'Hello!' inside the object 'myKey' of bucket 'myBucket':
var s3 = new AWS.S3();
Version 0.9.1-pre.2 : Preview
14
AWS SDK for Node.js Getting Started Guide
Amazon Simple Storage Service (Amazon S3)

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Amazon AWS SDK and is the answer not in the manual?

Amazon AWS SDK Specifications

General IconGeneral
CategorySoftware Development Kit (SDK)
DeveloperAmazon Web Services (AWS)
LicenseApache License 2.0
PurposeTo enable developers to interact with AWS services from their applications.
Supported LanguagesJava, Python, JavaScript, .NET, Ruby, PHP, Go, C++
Supported AWS ServicesAll AWS services
Operating SystemsWindows, macOS, Linux
Latest VersionVaries by SDK and language. Refer to the official AWS documentation for the specific SDK.
RepositoryGitHub (for many SDKs)
DocumentationAvailable on the AWS website.
SDK FeaturesAPI abstraction, request signing, error handling, retry logic, data serialization, and support for various authentication methods.

Related product manuals