README.md (11021B)
1 # AWS SDK for JavaScript 2 3 [![NPM](https://nodei.co/npm/aws-sdk.svg?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/aws-sdk/) 4 5 [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/aws/aws-sdk-js) 6 7 [![Version](https://badge.fury.io/js/aws-sdk.svg)](http://badge.fury.io/js/aws-sdk) [![Build Status](https://travis-ci.org/aws/aws-sdk-js.svg?branch=master)](https://travis-ci.org/aws/aws-sdk-js) [![Coverage Status](https://coveralls.io/repos/aws/aws-sdk-js/badge.svg?branch=master)](https://coveralls.io/r/aws/aws-sdk-js?branch=master) 8 9 The official AWS SDK for JavaScript, available for browsers and mobile devices, 10 or Node.js backends 11 12 For release notes, see the [CHANGELOG](CHANGELOG.md). Prior to v2.4.8, release notes can be found at http://aws.amazon.com/releasenotes/SDK/JavaScript 13 14 <p class="note"> 15 If you are upgrading from 1.x to 2.0 of the SDK, please see 16 the {file:UPGRADING.md} notes for information on how to migrate existing code 17 to work with the new major version. 18 </p> 19 20 ## Installing 21 22 ### In the Browser 23 24 To use the SDK in the browser, simply add the following script tag to your 25 HTML pages: 26 27 <script src="https://sdk.amazonaws.com/js/aws-sdk-2.7.7.min.js"></script> 28 29 You can also build a custom browser SDK with your specified set of AWS services. 30 This can allow you to reduce the SDK's size, specify different API versions of 31 services, or use AWS services that don't currently support CORS if you are 32 working in an environment that does not enforce CORS. To get started: 33 34 http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/building-sdk-for-browsers.html 35 36 The AWS SDK is also compatible with [browserify](http://browserify.org). 37 38 ### In Node.js 39 40 The preferred way to install the AWS SDK for Node.js is to use the 41 [npm](http://npmjs.org) package manager for Node.js. Simply type the following 42 into a terminal window: 43 44 ```sh 45 npm install aws-sdk 46 ``` 47 48 ### Using Bower 49 50 You can also use [Bower](http://bower.io) to install the SDK by typing the 51 following into a terminal window: 52 53 ```sh 54 bower install aws-sdk-js 55 ``` 56 57 ## Usage and Getting Started 58 59 You can find a getting started guide at: 60 61 http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide 62 63 ## Usage with TypeScript 64 The AWS SDK for JavaScript bundles TypeScript definition files for use in TypeScript projects and to support tools that can read `.d.ts` files. 65 Our goal is to keep these TypeScript definition files updated with each release for any public api. 66 67 ### Pre-requisites 68 Before you can begin using these TypeScript definitions with your project, you need to make sure your project meets a few of these requirements: 69 * Use TypeScript v2.x 70 * Includes the TypeScript definitions for node. You can use npm to install this by typing the following into a terminal window: 71 ```sh 72 npm install --save-dev @types/node 73 ``` 74 * Your `tsconfig.json` or `jsconfig.json` includes `'dom'` and `'es2015.promise'` under `compilerOptions.lib`. 75 See [tsconfig.json](./ts/tsconfig.json) for an example. 76 77 ### In the Browser 78 To use the TypeScript definition files with the global `AWS` object in a front-end project, add the following line to the top of your JavaScript file: 79 ```javascript 80 /// <reference types="aws-sdk" /> 81 ``` 82 This will provide support for the global `AWS` object. 83 84 ### In Node.js 85 To use the TypeScript definition files within a Node.js project, simply import `aws-sdk` as you normally would. 86 In a TypeScript file: 87 ```javascript 88 // import entire SDK 89 import AWS = require('aws-sdk'); 90 // import AWS object without services 91 import AWS = require('aws-sdk/global'); 92 // import individual service 93 import S3 = require('aws-sdk/clients/s3'); 94 ``` 95 In a JavaScript file: 96 ```javascript 97 // import entire SDK 98 var AWS = require('aws-sdk'); 99 // import AWS object without services 100 var AWS = require('aws-sdk/global'); 101 // import individual service 102 var S3 = require('aws-sdk/clients/s3'); 103 ``` 104 105 ### Known Limitations 106 There are a few known limitations with the bundled TypeScript definitions at this time: 107 * Service client typings reflect the latest `apiVersion`, regardless of which `apiVersion` is specified when creating a client. 108 * Service-bound parameters use the `any` type. 109 110 ## Supported Services 111 112 <p class="note"><strong>Note</strong>: 113 Although all services are supported in the browser version of the SDK, 114 not all of the services are available in the default hosted build (using the 115 script tag provided above). Instructions on how to build a 116 custom version of the SDK with individual services are provided 117 in the "<a href="http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/building-sdk-for-browsers.html">Building the SDK for Browsers</a>" section of the SDK Developer Guide. 118 </p> 119 120 The SDK currently supports the following services: 121 122 <table> 123 <thead> 124 <th>Service Name</th> 125 <th>Class Name</th> 126 <th>API Version</th> 127 </thead> 128 <tbody> 129 <tr><td>Amazon API Gateway</td><td>AWS.APIGateway</td><td>2015-07-09</td></tr> 130 <tr><td>Amazon CloudFront</td><td>AWS.CloudFront</td><td>2014-10-21</td></tr> 131 <tr><td>Amazon CloudHSM</td><td>AWS.CloudHSM</td><td>2014-05-30</td></tr> 132 <tr><td>Amazon CloudSearch</td><td>AWS.CloudSearch</td><td>2013-01-01</td></tr> 133 <tr><td>Amazon CloudSearch Domain</td><td>AWS.CloudSearchDomain</td><td>2013-01-01</td></tr> 134 <tr><td>Amazon CloudWatch</td><td>AWS.CloudWatch</td><td>2010-08-01</td></tr> 135 <tr><td>Amazon CloudWatch Events</td><td>AWS.CloudWatchLogs</td><td>2015-10-07</td></tr> 136 <tr><td>Amazon CloudWatch Logs</td><td>AWS.CloudWatchLogs</td><td>2014-03-28</td></tr> 137 <tr><td>Amazon Cognito Identity</td><td>AWS.CognitoIdentity</td><td>2014-06-30</td></tr> 138 <tr><td>Amazon Cognito Sync</td><td>AWS.CognitoSync</td><td>2014-06-30</td></tr> 139 <tr><td>Amazon DynamoDB</td><td>AWS.DynamoDB</td><td>2012-08-10</td></tr> 140 <tr><td>Amazon DynamoDB Streams</td><td>AWS.DynamoDBStreams</td><td>2012-08-10</td></tr> 141 <tr><td>Amazon EC2 Container Registry</td><td>AWS.ECR</td><td>2015-09-21</td></tr> 142 <tr><td>Amazon EC2 Container Service</td><td>AWS.ECS</td><td>2014-11-13</td></tr> 143 <tr><td>Amazon Elastic Compute Cloud</td><td>AWS.EC2</td><td>2014-10-01</td></tr> 144 <tr><td>Amazon Elastic File System</td><td>AWS.EFS</td><td>2015-02-01</td></tr> 145 <tr><td>Amazon Elastic MapReduce</td><td>AWS.EMR</td><td>2009-03-31</td></tr> 146 <tr><td>Amazon Elastic Transcoder</td><td>AWS.ElasticTranscoder</td><td>2012-09-25</td></tr> 147 <tr><td>Amazon ElastiCache</td><td>AWS.ElastiCache</td><td>2014-09-30</td></tr> 148 <tr><td>Amazon Elasticsearch Service</td><td>AWS.ES</td><td>2015-01-01</td></tr> 149 <tr><td>Amazon GameLift</td><td>AWS.GameLift</td><td>2015-10-01</td></tr> 150 <tr><td>Amazon Glacier</td><td>AWS.Glacier</td><td>2012-06-01</td></tr> 151 <tr><td>Amazon Inspector</td><td>AWS.Inspector</td><td>2016-02-16</td></tr> 152 <tr><td>Amazon Kinesis</td><td>AWS.Kinesis</td><td>2013-12-02</td></tr> 153 <tr><td>Amazon Kinesis Analytics</td><td>AWS.KinesisAnalytics</td><td>2015-08-14</td></tr> 154 <tr><td>Amazon Kinesis Firehose</td><td>AWS.Firehose</td><td>2015-08-04</td></tr> 155 <tr><td>Amazon Machine Learning</td><td>AWS.MachineLearning</td><td>2014-12-12</td></tr> 156 <tr><td>Amazon Mobile Analytics</td><td>AWS.MobileAnalytics</td><td>2014-06-05</td></tr> 157 <tr><td>Amazon Redshift</td><td>AWS.Redshift</td><td>2012-12-01</td></tr> 158 <tr><td>Amazon Relational Database Service</td><td>AWS.RDS</td><td>2014-09-01</td></tr> 159 <tr><td>Amazon Route 53</td><td>AWS.Route53</td><td>2013-04-01</td></tr> 160 <tr><td>Amazon Route 53 Domains</td><td>AWS.Route53Domains</td><td>2014-05-15</td></tr> 161 <tr><td>Amazon Simple Email Service</td><td>AWS.SES</td><td>2010-12-01</td></tr> 162 <tr><td>Amazon Simple Notification Service</td><td>AWS.SNS</td><td>2010-03-31</td></tr> 163 <tr><td>Amazon Simple Queue Service</td><td>AWS.SQS</td><td>2012-11-05</td></tr> 164 <tr><td>Amazon Simple Storage Service</td><td>AWS.S3</td><td>2006-03-01</td></tr> 165 <tr><td>Amazon Simple Systems Management Service</td><td>AWS.SSM</td><td>2014-11-06</td></tr> 166 <tr><td>Amazon Simple Workflow Service</td><td>AWS.SWF</td><td>2012-01-25</td></tr> 167 <tr><td>Amazon SimpleDB</td><td>AWS.SimpleDB</td><td>2009-04-15</td></tr> 168 <tr><td>Amazon Snowball</td><td>AWS.Snowball</td><td>2016-06-30</td></tr> 169 <tr><td>Amazon WorkSpaces</td><td>AWS.WorkSpaces</td><td>2015-04-08</td></tr> 170 <tr><td>Auto Scaling</td><td>AWS.AutoScaling</td><td>2011-01-01</td></tr> 171 <tr><td>AWS Certificate Manager</td><td>AWS.ACM</td><td>2015-12-08</td></tr> 172 <tr><td>AWS CloudFormation</td><td>AWS.CloudFormation</td><td>2010-05-15</td></tr> 173 <tr><td>AWS CloudTrail</td><td>AWS.CloudTrail</td><td>2013-11-01</td></tr> 174 <tr><td>AWS CodeCommit</td><td>AWS.CodeCommit</td><td>2015-04-13</td></tr> 175 <tr><td>AWS CodeDeploy</td><td>AWS.CodeDeploy</td><td>2014-10-06</td></tr> 176 <tr><td>AWS CodePipeline</td><td>AWS.CodePipeline</td><td>2015-07-09</td></tr> 177 <tr><td>AWS Config</td><td>AWS.ConfigService</td><td>2014-11-12</td></tr> 178 <tr><td>AWS Data Pipeline</td><td>AWS.DataPipeline</td><td>2012-10-29</td></tr> 179 <tr><td>AWS Database Migration Service</td><td>AWS.DMS</td><td>2016-01-01</td></tr> 180 <tr><td>AWS Device Farm</td><td>AWS.DeviceFarm</td><td>2015-06-23</td></tr> 181 <tr><td>AWS Direct Connect</td><td>AWS.DirectConnect</td><td>2012-10-25</td></tr> 182 <tr><td>AWS Directory Service</td><td>AWS.DirectoryService</td><td>2015-04-16</td></tr> 183 <tr><td>AWS Elastic Beanstalk</td><td>AWS.ElasticBeanstalk</td><td>2010-12-01</td></tr> 184 <tr><td>AWS Identity and Access Management</td><td>AWS.IAM</td><td>2010-05-08</td></tr> 185 <tr><td>AWS Import/Export</td><td>AWS.ImportExport</td><td>2010-06-01</td></tr> 186 <tr><td>AWS IoT</td><td>AWS.Iot</td><td>2015-05-28</td></tr> 187 <tr><td>AWS IoT Data Plane</td><td>AWS.IotData</td><td>2015-05-28</td></tr> 188 <tr><td>AWS Key Management Service</td><td>AWS.KMS</td><td>2014-11-01</td></tr> 189 <tr><td>AWS Lambda</td><td>AWS.Lambda</td><td>2015-03-31</td></tr> 190 <tr><td>AWS Marketplace Commerce Analytics</td><td>AWS.MarketplaceCommerceAnalytics</td><td>2015-07-01</td></tr> 191 <tr><td>AWS Marketplace Metering</td><td>AWS.MarketplaceMetering</td><td>2016-01-14</td></tr> 192 <tr><td>AWS OpsWorks</td><td>AWS.OpsWorks</td><td>2013-02-18</td></tr> 193 <tr><td>AWS Security Token Service</td><td>AWS.STS</td><td>2011-06-15</td></tr> 194 <tr><td>AWS Storage Gateway</td><td>AWS.StorageGateway</td><td>2013-06-30</td></tr> 195 <tr><td>AWS Support</td><td>AWS.Support</td><td>2013-04-15</td></tr> 196 <tr><td>AWS WAF</td><td>AWS.WAF</td><td>2015-08-24</td></tr> 197 <tr><td>Elastic Load Balancing</td><td>AWS.ELB</td><td>2012-06-01</td></tr> 198 <tr><td>Elastic Load Balancing v2</td><td>AWS.ELBv2</td><td>2015-12-01</td></tr> 199 </tbody> 200 </table> 201 202 ## License 203 204 This SDK is distributed under the 205 [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), 206 see LICENSE.txt and NOTICE.txt for more information.