Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 131 lines (105 sloc) 5.435 kb
1a07549 @lsegal Add NPM version badge
lsegal authored
1 # AWS SDK for Node.js [![NPM version](https://badge.fury.io/js/aws-sdk.png)](http://badge.fury.io/js/aws-sdk) [![Build Status](https://travis-ci.org/aws/aws-sdk-js.png?branch=master)](https://travis-ci.org/aws/aws-sdk-js)
d120626 @lsegal Add basic README, update package.json
lsegal authored
2
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
3 The official JavaScript implementation of the AWS SDK for Node.js.
d120626 @lsegal Add basic README, update package.json
lsegal authored
4
5 ## Installing
6
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
7 The preferred way to install the AWS SDK for Node.js is to use the
8 [npm](http://npmjs.org) package manager for Node.js. Simply type the following
59d84d9 @lsegal Fix typo in README
lsegal authored
9 into a terminal window:
d120626 @lsegal Add basic README, update package.json
lsegal authored
10
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
11 ```sh
12 npm install aws-sdk
d120626 @lsegal Add basic README, update package.json
lsegal authored
13 ```
14
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
15 ## Usage
d120626 @lsegal Add basic README, update package.json
lsegal authored
16
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
17 After you've installed the SDK, you can require the AWS package in your node
18 application using `require`:
d120626 @lsegal Add basic README, update package.json
lsegal authored
19
20 ```js
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
21 var AWS = require('aws-sdk');
d120626 @lsegal Add basic README, update package.json
lsegal authored
22 ```
23
f2d4016 @carljparker editorial review
carljparker authored
24 Here is a quick example that makes some requests against Amazon S3 with the SDK:
d120626 @lsegal Add basic README, update package.json
lsegal authored
25
26 ```js
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
27 // Load the AWS SDK for Node.js
28 var AWS = require('aws-sdk');
d120626 @lsegal Add basic README, update package.json
lsegal authored
29
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
30 /**
f2d4016 @carljparker editorial review
carljparker authored
31 * Don't hard-code your credentials!
32 * Load them from disk or your environment instead.
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
33 */
34 // AWS.config.update({accessKeyId: 'AKID', secretAccessKey: 'SECRET'});
3194a3f @trevorrowe Updated README (getting started guide).
trevorrowe authored
35
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
36 // Instead, do this:
37 AWS.config.loadFromPath('./path/to/credentials.json');
3194a3f @trevorrowe Updated README (getting started guide).
trevorrowe authored
38
f2d4016 @carljparker editorial review
carljparker authored
39 // Set your region for future requests.
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
40 AWS.config.update({region: 'us-east-1'});
3194a3f @trevorrowe Updated README (getting started guide).
trevorrowe authored
41
8ea211f @lsegal Add bound parameters to Service objects
lsegal authored
42 // Create a bucket using bound parameters and put something in it.
f38dfcd @lsegal Add note about changing bucket name in getting started guide.
lsegal authored
43 // Make sure to change the bucket name from "myBucket" to something unique.
8ea211f @lsegal Add bound parameters to Service objects
lsegal authored
44 var s3bucket = new AWS.S3({params: {Bucket: 'myBucket'}});
45 s3bucket.createBucket(function() {
46 var data = {Key: 'myKey', Body: 'Hello!'};
47 s3bucket.putObject(data, function(err, data) {
561b18f @lsegal Update README example to use Node-style callback
lsegal authored
48 if (err) {
49 console.log("Error uploading data: ", err);
50 } else {
51 console.log("Successfully uploaded data to myBucket/myKey");
52 }
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
53 });
3194a3f @trevorrowe Updated README (getting started guide).
trevorrowe authored
54 });
d120626 @lsegal Add basic README, update package.json
lsegal authored
55 ```
56
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
57 ## Getting Started Guide
d120626 @lsegal Add basic README, update package.json
lsegal authored
58
f2d4016 @carljparker editorial review
carljparker authored
59 You can find a getting started guide at:
3194a3f @trevorrowe Updated README (getting started guide).
trevorrowe authored
60
892acc5 @lsegal Update links to getting started guide
lsegal authored
61 http://docs.amazonwebservices.com/nodejs/latest/dg/
3194a3f @trevorrowe Updated README (getting started guide).
trevorrowe authored
62
4f5c0e7 @lsegal Add list of supported services to README
lsegal authored
63 ## Supported Services
64
65 The SDK currently supports the following services:
66
4632ed1 @lsegal Resize services table in README.md
lsegal authored
67 <table>
4f5c0e7 @lsegal Add list of supported services to README
lsegal authored
68 <thead>
69 <th>Service Name</th>
70 <th>Class Name</th>
3086a98 @lsegal Update API versions in README
lsegal authored
71 <th>API Version</th>
4f5c0e7 @lsegal Add list of supported services to README
lsegal authored
72 </thead>
73 <tbody>
3086a98 @lsegal Update API versions in README
lsegal authored
74 <tr><td rowspan="2">Amazon CloudFront</td><td rowspan="2">AWS.CloudFront</td><td>2012-05-05</td></tr>
75 <tr><td>2013-05-12</td></tr>
76 <tr><td>Amazon CloudSearch</td><td>AWS.CloudSearch</td><td>2011-02-01</td></tr>
77 <tr><td>Amazon CloudWatch</td><td>AWS.CloudWatch</td><td>2010-08-01</td></tr>
78 <tr><td rowspan="2">Amazon DynamoDB</td><td rowspan="2">AWS.DynamoDB</td><td>2011-12-05</td></tr>
79 <tr><td>2012-08-10</td></tr>
80 <tr><td>Amazon Elastic Compute Cloud</td><td>AWS.EC2</td><td>2013-07-15</td></tr>
81 <tr><td>Amazon Elastic MapReduce</td><td>AWS.EMR</td><td>2009-03-31</td></tr>
82 <tr><td>Amazon Elastic Transcoder</td><td>AWS.ElasticTranscoder</td><td>2012-09-25</td></tr>
83 <tr><td>Amazon ElastiCache</td><td>AWS.ElastiCache</td><td>2012-11-15</td></tr>
84 <tr><td>Amazon Glacier</td><td>AWS.Glacier</td><td>2012-06-01</td></tr>
85 <tr><td>Amazon Redshift</td><td>AWS.Redshift</td><td>2012-12-01</td></tr>
86 <tr><td rowspan="3">Amazon Relational Database Service</td><td rowspan="3">AWS.RDS</td><td>2013-01-10</td></tr>
87 <tr><td>2013-02-12</td></tr>
88 <tr><td>2013-05-15</td></tr>
89 <tr><td>Amazon Route 53</td><td>AWS.Route53</td><td>2012-12-12</td></tr>
90 <tr><td>Amazon Simple Email Service</td><td>AWS.SES</td><td>2010-12-01</td></tr>
91 <tr><td>Amazon Simple Notification Service</td><td>AWS.SNS</td><td>2010-03-31</td></tr>
92 <tr><td>Amazon Simple Queue Service</td><td>AWS.SQS</td><td>2012-11-05</td></tr>
93 <tr><td>Amazon Simple Storage Service</td><td>AWS.S3</td><td>2006-03-01</td></tr>
94 <tr><td>Amazon Simple Workflow Service</td><td>AWS.SimpleWorkflow</td><td>2012-01-25</td></tr>
95 <tr><td>Amazon SimpleDB</td><td>AWS.SimpleDB</td><td>2009-04-15</td></tr>
96 <tr><td>Auto Scaling</td><td>AWS.AutoScaling</td><td>2011-01-01</td></tr>
97 <tr><td>AWS CloudFormation</td><td>AWS.CloudFormation</td><td>2010-05-15</td></tr>
98 <tr><td>AWS Data Pipeline</td><td>AWS.DataPipeline</td><td>2012-10-29</td></tr>
99 <tr><td>AWS Direct Connect</td><td>AWS.DirectConnect</td><td>2012-10-25</td></tr>
100 <tr><td>AWS Elastic Beanstalk</td><td>AWS.ElasticBeanstalk</td><td>2010-12-01</td></tr>
101 <tr><td>AWS Identity and Access Management</td><td>AWS.IAM</td><td>2010-05-08</td></tr>
102 <tr><td>AWS Import/Export</td><td>AWS.ImportExport</td><td>2010-06-01</td></tr>
103 <tr><td>AWS OpsWorks</td><td>AWS.OpsWorks</td><td>2013-02-18</td></tr>
104 <tr><td>AWS Security Token Service</td><td>AWS.STS</td><td>2011-06-15</td></tr>
105 <tr><td>AWS Storage Gateway</td><td>AWS.StorageGateway</td><td>2012-06-30</td></tr>
106 <tr><td>AWS Support</td><td>AWS.Support</td><td>2013-04-15</td></tr>
107 <tr><td>Elastic Load Balancing</td><td>AWS.ELB</td><td>2012-06-01</td></tr>
4f5c0e7 @lsegal Add list of supported services to README
lsegal authored
108 </tbody>
109 </table>
110
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
111 ## License
d120626 @lsegal Add basic README, update package.json
lsegal authored
112
113 This SDK is distributed under the
114 [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
115
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
116 ```no-highlight
f2d4016 @carljparker editorial review
carljparker authored
117 Copyright 2012. Amazon Web Services, Inc. All Rights Reserved.
d120626 @lsegal Add basic README, update package.json
lsegal authored
118
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
119 Licensed under the Apache License, Version 2.0 (the "License");
120 you may not use this file except in compliance with the License.
121 You may obtain a copy of the License at
d120626 @lsegal Add basic README, update package.json
lsegal authored
122
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
123 http://www.apache.org/licenses/LICENSE-2.0
d120626 @lsegal Add basic README, update package.json
lsegal authored
124
5b8905c @lsegal Add initial getting started guide docs
lsegal authored
125 Unless required by applicable law or agreed to in writing, software
126 distributed under the License is distributed on an "AS IS" BASIS,
127 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
128 See the License for the specific language governing permissions and
129 limitations under the License.
130 ```
Something went wrong with that request. Please try again.