Example: air traffic controller

AWS SDK for JavaScript - Developer Guide for SDK …

AWS SDK for JavaScriptDeveloper Guide for SDK v2 AWS SDK for JavaScript Developer Guide for SDK v2 AWS SDK for JavaScript : Developer Guide for SDK v2 Copyright 2018 Amazon Web Services, Inc. and/or its affiliates. All rights 's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any mannerthat is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks notowned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored SDK for JavaScript Developer Guide for SDK v2 Table of ContentsWhat Is the AWS SDK for JavaScript ? .. 1 Using the SDK with .. 1 Using the SDK with AWS Cloud9 .. 1 Using the SDK with AWS Amplify .. 1 Using the SDK with Web Browsers .. 2 Common Use Cases.. 2 Getting Started.

AWS SDK for JavaScript Developer Guide for SDK v2 Table of Contents What Is the AWS SDK for JavaScript? ..... 1

Tags:

  Developer, Guide, Javascript, Aws sdk for javascript developer guide

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of AWS SDK for JavaScript - Developer Guide for SDK …

1 AWS SDK for JavaScriptDeveloper Guide for SDK v2 AWS SDK for JavaScript Developer Guide for SDK v2 AWS SDK for JavaScript : Developer Guide for SDK v2 Copyright 2018 Amazon Web Services, Inc. and/or its affiliates. All rights 's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any mannerthat is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks notowned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored SDK for JavaScript Developer Guide for SDK v2 Table of ContentsWhat Is the AWS SDK for JavaScript ? .. 1 Using the SDK with .. 1 Using the SDK with AWS Cloud9 .. 1 Using the SDK with AWS Amplify .. 1 Using the SDK with Web Browsers .. 2 Common Use Cases.. 2 Getting Started.

2 3 Getting Started in a Browser Script .. 3 The Scenario .. 3 Step 1: Create an Amazon Cognito Identity Pool .. 4 Step 2: Add a Policy to the Created IAM Role .. 4 Step 3: Create the HTML Page .. 5 Step 4: Write the Browser Script .. 5 Step 5: Run the Sample.. 5 Full Sample.. 7 Possible Enhancements .. 8 Getting Started in .. 8 The Scenario .. 8 Prerequisite Tasks .. 8 Step 1: Configure Your Credentials .. 9 Step 2: Create the Package JSON for the Project .. 9 Step 3: Install the SDK and Dependencies.. 9 Step 4: Write the Code .. 10 Step 5: Run the Sample.. 10 Using AWS Cloud9 with the SDK for JavaScript .. 11 Step 1: Set up Your AWS Account to Use AWS Cloud9 .. 11 Step 2: Set up Your AWS Cloud9 Development Environment .. 11 Step 3: Set up the SDK for JavaScript .. 12To set up the SDK for JavaScript for .. 12To set up the SDK for JavaScript in the browser.

3 12 Step 4: Download Example Code .. 12 Step 5: Run and Debug Example Code.. 13 Setting Up the SDK for JavaScript .. 14 Prerequisites .. 14 Setting Up an AWS Environment .. 14 Web Browsers Supported .. 14 Installing the SDK.. 15 Installing Using Bower .. 16 Loading the SDK.. 16 Upgrading From Version 1 .. 17 Automatic Conversion of Base64 and Timestamp Types on Input/Output .. 17 Moved to .. 17 Exposed Wrapper Elements .. 18 Dropped Client Properties .. 19 Configuring the SDK for JavaScript .. 20 Using the Global Configuration Object .. 20 Setting Global Configuration .. 20 Setting Configuration Per Service .. 21 Immutable Configuration Data.. 22 Setting the AWS Region .. 22In a Client Class Constructor .. 22 Using the Global Configuration Object .. 22 Using an Environment Variable .. 22 Using a Shared Config File.

4 22iiiAWS SDK for JavaScript Developer Guide for SDK v2 Order of Precedence for Setting the Region .. 23 Specifying Custom Endpoints .. 23 Endpoint String Format .. 23 Endpoints for the ap-northeast-3 Region .. 23 Endpoints for MediaConvert .. 24 Getting Your Credentials .. 24 Setting Credentials .. 25 Best Practices for Credentials .. 25 Setting Credentials in .. 25 Setting Credentials in a Web Browser .. 28 Locking API Versions .. Considerations.. 35 Using Built-In Modules .. 35 Using NPM Packages .. 35 Configuring maxSockets in .. 36 Configuring Proxies for .. 36 Registering Certificate Bundles in .. 37 Browser Script Considerations .. 37 Building the SDK for Browsers .. 37 Cross-Origin Resource Sharing (CORS) .. 40 Bundling with Webpack .. 42 Installing Webpack .. 42 Configuring Webpack .. 43 Running Webpack.

5 43 Using the Webpack Bundle .. 44 Importing Individual Services .. 44 Bundling for .. 45 Working with Services .. 47 Creating and Calling Service Objects .. 47 Requiring Individual Services .. 48 Creating Service Objects .. 49 Locking the API Version of a Service Object .. 49 Specifying Service Object Parameters .. 49 Logging AWS SDK for JavaScript Calls .. 50 Using a Third-Party Logger .. 50 Calling Services Asychronously .. 51 Managing Asychronous Calls .. 51 Using a Callback Function .. 52 Using a Request Object Event Listener .. 53 Using Promises .. 57 Requests With a Stream Object .. 58 Using the Response Object .. 59 Accessing Data Returned in the Response Object .. 59 Paging Through Returned Data .. 60 Accessing Error Information from a Response Object .. 60 Accessing the Originating Request Object .. 60 Working with JSON.

6 60 JSON as Service Object Parameters .. 61 Returning Data as JSON.. 62 SDK for JavaScript Code Examples .. 63 Amazon CloudWatch Examples .. 63 Creating Alarms in Amazon CloudWatch .. 64 Using Alarm Actions in Amazon CloudWatch .. 67 Getting Metrics from Amazon CloudWatch .. 69 Sending Events to Amazon CloudWatch Events .. 72 Using Subscription Filters in Amazon CloudWatch Logs .. 75 Amazon DynamoDB Examples .. 79ivAWS SDK for JavaScript Developer Guide for SDK v2 Creating and Using Tables in DynamoDB .. 79 Reading and Writing A Single Item in DynamoDB .. 83 Reading and Writing Items in Batch in DynamoDB .. 86 Querying and Scanning a DynamoDB Table .. 88 Using the DynamoDB Document Client.. 91 Amazon EC2 Examples .. 95 Creating an Amazon EC2 Instance .. 96 Managing Amazon EC2 Instances .. 98 Working with Amazon EC2 Key Pairs .. 102 Using Regions and Availability Zones with Amazon EC2.

7 105 Working with Security Groups in Amazon EC2 .. 106 Using Elastic IP Addresses in Amazon EC2 .. 110 MediaConvert Examples .. 113 Getting Your Account-Specific Endpoint .. 113 Creating and Managing Jobs .. 115 Using Job Templates .. 120 Amazon Glacier Examples .. 126 Creating an Amazon Glacier Vault .. 127 Uploading an Archive to Amazon Glacier .. 127 Doing a Multipart Upload to Amazon Glacier .. 128 AWS IAM Examples .. 129 Managing IAM Users.. 130 Working with IAM Policies .. 134 Managing IAM Access Keys .. 138 Working with IAM Server Certificates .. 142 Managing IAM Account Aliases .. 145 Amazon Kinesis Example .. 147 Capturing Web Page Scroll Progress with Amazon Kinesis .. 148 AWS Lambda Examples .. 152 Using Lambda in Web Pages .. 153 Invoking a Lambda Function in the Browser .. 153 Writing a Lambda Function in .. 157 Amazon S3 Examples.

8 161 Uploading Photos to Amazon S3 from a Browser .. 161 Creating and Using Amazon S3 Buckets .. 171 Configuring Amazon S3 Buckets .. 175 Managing Amazon S3 Bucket Access Permissions .. 177 Working with Amazon S3 Bucket Policies .. 179 Using an Amazon S3 Bucket as a Static Web Host .. 182 Amazon SES Examples .. 185 Managing Identities.. 185 Working with Email Templates .. 189 Sending Email Using Amazon SES .. 193 Using IP Address Filters .. 197 Using Receipt Rules .. 200 Amazon SNS Examples .. 204 Managing Topics .. 204 Publishing Messages to a Topic .. 208 Managing Subscriptions.. 209 Sending SMS Messages.. 213 Amazon SQS Examples .. 218 Using Queues in Amazon SQS .. 218 Sending and Receiving Messages in Amazon SQS .. 221 Managing Visibility Timeout in Amazon SQS .. 224 Enabling Long Polling in Amazon SQS .. 226 Using Dead Letter Queues in Amazon SQS.

9 229 Tutorials .. 231vAWS SDK for JavaScript Developer Guide for SDK v2 Tutorial: Setting Up on an Amazon EC2 Instance .. 231 Prerequisites .. 231 Procedure .. 231 Creating an Amazon Machine Image .. 232 Related Resources .. 232 Tutorial: Creating and Using Lambda Functions .. 232 The Scenario .. 232 Prerequisites .. 233 Tutorial Steps .. 233 Create an Amazon S3 Bucket Configured as a Static Website .. 234 Prepare the Browser Script .. 236 Create a Lambda Execution Role in IAM.. 237 Create and Populate a DynamoDB Table .. 239 Prepare and Create the Lambda Function .. 243 Run the Lambda Function .. 246 API Reference and Changelog .. 249 SDK Changelog on GitHub.. 249 Additional Resources .. 250 JavaScript SDK Forum.. 250 JavaScript SDK and Developer Guide on GitHub .. 250 JavaScript SDK on Gitter .. 250 Document History .. 251 Document History.

10 251 Earlier Updates.. 252viAWS SDK for JavaScript Developer Guide for SDK v2 Using the SDK with Is the AWS SDK for JavaScript ?The AWS SDK for JavaScript provides a JavaScript API for AWS services you can use to build applicationsfor or the browser. The JavaScript API lets developers build libraries or applications that makeuse of AWS all services are immediately available in the SDK. To find out which services are currently supportedby the AWS SDK for JavaScript , see Forinformation about the SDK for JavaScript on GitHub, see Additional Resources (p. 250).Using the SDK with a cross-platform runtime for running server-side JavaScript applications. You can set up an Amazon EC2 instance to run on a server. You can also use to write on-demand AWSL ambda the SDK for JavaScript for differs from using it for JavaScript in a web browser in the wayyou load the SDK and in how you obtain the credentials needed to access specific web services.


Related search queries