The Wayback Machine - https://web.archive.org/web/20200609224839/https://github.com/aws/aws-sdk-js
Skip to content
AWS SDK for JavaScript in the browser and Node.js
JavaScript Ruby Gherkin HTML CSS TypeScript CoffeeScript
Branch: master
Clone or download

Latest commit

awstools
Latest commit 0a14270 Jun 9, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.changes Updates SDK to v2.693.0 Jun 9, 2020
.github Delete no-response bot configuration file (#3268) May 27, 2020
.vscode add vscode launch config and workspace settings (#2828) Aug 28, 2019
apis Updates SDK to v2.693.0 Jun 9, 2020
clients Updates SDK to v2.693.0 Jun 9, 2020
dist-tools Remove deprecated buffer constructor (#2687) May 30, 2019
dist Updates SDK to v2.693.0 Jun 9, 2020
doc-src add parsejs gem to local (#2753) Jul 1, 2019
features enable termivation protection to cloudformation integ test (#3252) May 13, 2020
lib Updates SDK to v2.693.0 Jun 9, 2020
scripts fix issues with required endpoint discovery feature (#3269) May 22, 2020
tasks Client side monitoring functional tests (#2316) Oct 22, 2018
test fix issues with required endpoint discovery feature (#3269) May 22, 2020
ts Fixes callback typing in credentials refresh (#3172) May 20, 2020
vendor/endpoint-cache Endpoint Discovery Feature (#2253) Nov 8, 2018
.eslintignore ignore linting temporary test config Mar 21, 2019
.eslintrc fix: update eslint, enforce semi, apply to test dir (#2336) Jan 22, 2019
.gitignore Endpoint Discovery Feature (#2253) Nov 8, 2018
.jshintrc Remove JSHint options CC doesn't understand Oct 2, 2014
.npmignore Revert "chore: npmignore dist-tools folder (#3167)" (#3178) Mar 23, 2020
.tesselinclude Adds .tesselinclude for resource deployment inclusion. Fixes gh-967 Apr 18, 2016
.travis.yml fix: move comprehensive test to CodeBuild (#3154) Mar 17, 2020
.yardopts adjust tags for compatibility Dec 21, 2018
.yardopts_guide Add UPGRADING.md to guide Jun 13, 2014
CHANGELOG.md Updates SDK to v2.693.0 Jun 9, 2020
CONTRIBUTING.md doc: brew cask install phantomjs (#2701) Jun 13, 2019
Gemfile add parsejs gem to local (#2753) Jul 1, 2019
Gemfile.lock Bump rake from 10.1.1 to 13.0.1 (#3124) Mar 18, 2020
LICENSE.txt Update copyright years throughout Jan 31, 2017
NOTICE.txt Update copyright years throughout Jan 31, 2017
README.md Updates SDK to v2.693.0 Jun 9, 2020
Rakefile Don't need bundle/setup in Rakefile Mar 14, 2014
SERVICES.md Updated the file for X-ray, connect and IotAnalytics for cors service ( Oct 28, 2019
UPGRADING.md Update upgrading notes to mention removed `.client` property. Jun 20, 2014
bower.json Update bower.json Jul 7, 2015
browser.js Updates node and browser loaders Sep 8, 2016
buildspec.yml chore: pass token while calling CodeCov (#3158) Mar 18, 2020
codecov.yml Endpoint Discovery Feature (#2253) Nov 8, 2018
configuration.sample Creates and deletes dynamoDB table in integration tests (#3205) Apr 8, 2020
global.d.ts Bundles TypeScript definition files and adds generation of d.ts files… Nov 10, 2016
global.js Updates node and browser loaders Sep 8, 2016
index.d.ts Bundles TypeScript definition files and adds generation of d.ts files… Nov 10, 2016
index.js Add index.js for convenience Jul 8, 2014
karma.conf.js aws-sdk-js: Replaced PhantomJS with chrome (#2264) Oct 2, 2018
package.json Updates SDK to v2.693.0 Jun 9, 2020
react-native.js Updates React Native build to allow same style imports as JS SDK (#1618) Jul 10, 2017
testem.json Update testem.json Aug 26, 2014

README.md

AWS SDK for JavaScript

NPM version NPM downloads Gitter chat

Build Status Coverage Status Known Vulnerabilities

The official AWS SDK for JavaScript, available for browsers and mobile devices, or Node.js backends

For release notes, see the CHANGELOG. Prior to v2.4.8, release notes can be found at https://aws.amazon.com/releasenotes/?tag=releasenotes%23keywords%23javascript

If you are upgrading from 1.x to 2.0 of the SDK, please see the upgrading notes for information on how to migrate existing code to work with the new major version.

Installing

In the Browser

To use the SDK in the browser, simply add the following script tag to your HTML pages:

<script src="https://sdk.amazonaws.com/js/aws-sdk-2.693.0.min.js"></script>

You can also build a custom browser SDK with your specified set of AWS services. This can allow you to reduce the SDK's size, specify different API versions of services, or use AWS services that don't currently support CORS if you are working in an environment that does not enforce CORS. To get started:

http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/building-sdk-for-browsers.html

The AWS SDK is also compatible with browserify.

For browser-based web, mobile and hybrid apps, you can use AWS Amplify Library which extends the AWS SDK and provides an easier and declarative interface.

In Node.js

The preferred way to install the AWS SDK for Node.js is to use the npm package manager for Node.js. Simply type the following into a terminal window:

npm install aws-sdk

In React Native

To use the SDK in a react native project, first install the SDK using npm:

npm install aws-sdk

Then within your application, you can reference the react native compatible version of the SDK with the following:

var AWS = require('aws-sdk/dist/aws-sdk-react-native');

Alternatively, you can use AWS Amplify Library which extends AWS SDK and provides React Native UI components and CLI support to work with AWS services.

Using Bower

You can also use Bower to install the SDK by typing the following into a terminal window:

bower install aws-sdk-js

Usage and Getting Started

You can find a getting started guide at:

http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide

API reference at:

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/

Usage with TypeScript

The AWS SDK for JavaScript bundles TypeScript definition files for use in TypeScript projects and to support tools that can read .d.ts files. Our goal is to keep these TypeScript definition files updated with each release for any public api.

Pre-requisites

Before you can begin using these TypeScript definitions with your project, you need to make sure your project meets a few of these requirements:

  • Use TypeScript v2.x

  • Includes the TypeScript definitions for node. You can use npm to install this by typing the following into a terminal window:

    npm install --save-dev @types/node
  • If you are targeting at es5 or older ECMA standards, your tsconfig.json has to include 'es5' and 'es2015.promise' under compilerOptions.lib. See tsconfig.json for an example.

In the Browser

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:

/// <reference types="aws-sdk" />

This will provide support for the global AWS object.

In Node.js

To use the TypeScript definition files within a Node.js project, simply import aws-sdk as you normally would.

In a TypeScript file:

// import entire SDK
import AWS from 'aws-sdk';
// import AWS object without services
import AWS from 'aws-sdk/global';
// import individual service
import S3 from 'aws-sdk/clients/s3';

In a JavaScript file:

// import entire SDK
var AWS = require('aws-sdk');
// import AWS object without services
var AWS = require('aws-sdk/global');
// import individual service
var S3 = require('aws-sdk/clients/s3');

With React

To create React applications with AWS SDK, you can use AWS Amplify Library which provides React components and CLI support to work with AWS services.

With Angular

Due to the SDK's reliance on node.js typings, you may encounter compilation issues when using the typings provided by the SDK in an Angular project created using the Angular CLI.

To resolve these issues, either add "types": ["node"] to the project's tsconfig.app.json file, or remove the "types" field entirely.

AWS Amplify Library provides Angular components and CLI support to work with AWS services.

Known Limitations

There are a few known limitations with the bundled TypeScript definitions at this time:

  • Service client typings reflect the latest apiVersion, regardless of which apiVersion is specified when creating a client.
  • Service-bound parameters use the any type.

Getting Help

Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.

  • Ask a question on StackOverflow and tag it with aws-sdk-js
  • Come join the AWS JavaScript community on gitter
  • Open a support ticket with AWS Support
  • If it turns out that you may have found a bug, please open an issue

Opening Issues

If you encounter a bug with the AWS SDK for JavaScript we would like to hear about it. Search the existing issues and try to make sure your problem doesn’t already exist before opening a new issue. It’s helpful if you include the version of the SDK, Node.js or browser environment and OS you’re using. Please include a stack trace and reduced repro case when appropriate, too.

The GitHub issues are intended for bug reports and feature requests. For help and questions with using the AWS SDK for JavaScript please make use of the resources listed in the Getting Help section. There are limited resources available for handling issues and by keeping the list of open issues lean we can respond in a timely manner.

Supported Services

Please see SERVICES.md for a list of supported services.

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE.txt and NOTICE.txt for more information.

You can’t perform that action at this time.