You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UPGRADING.md
+22-19Lines changed: 22 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,22 @@
1
1
# Upgrading Notes (2.x to 3.x)
2
2
3
-
This document captures notable changes from v2 SDK to v3 SDK, as known as modular JavaScript SDK for AWS.
3
+
This document captures notable changes from AWS SDK for JavaScript v2 to v3.
4
+
The v3 is also known as modular AWS SDK for JavaScript.
4
5
5
6
Because v3 is a modular rewrite of v2, some basic conceptions are different between v2 and v3. You can learn about
6
-
these changes in our fast growing list of [blog posts](https://aws.amazon.com/blogs/developer/category/developer-tools/aws-sdk-for-javascript-in-node-js/). Among the blog posts, The following 2 will get you up-to-speed:
7
+
these changes in our [blog posts](https://aws.amazon.com/blogs/developer/category/developer-tools/aws-sdk-for-javascript-in-node-js/).
8
+
The following blog posts will get you up to speed:
-[Modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)
11
+
-[Introducing Middleware Stack in Modular AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/first-class-typescript-support-in-modular-aws-sdk-for-javascript/)
10
12
11
-
Bellow are a summary of interface changes from v2 to v3 SDK. The goal is to help you easily find the v3 equivalents of
12
-
the v2 APIs you are already familiar with.
13
+
The summary of interface changes from AWS SDK for JavaScript v2 to v3 is given below.
14
+
The goal is to help you easily find the v3 equivalents of the v2 APIs you are already familiar with.
13
15
14
16
## Client Constructors
15
17
16
-
This list is indexed by [parameters in v2 SDK](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html). For
17
-
options shown as `Planned` in v3, they are confirmed to be supported, but no timeline can be shared at the moment. They
18
+
This list is indexed by [v2 config parameters](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html). For
19
+
options shown as `Planned` in v3, they will be supported but no timeline can be shared at the moment. They
-**v2**: The AWS credentials to sign requests with.
37
-
-**v3**: No change. It can also be an async function that returns a credential.
38
-
See [v3 reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/interfaces/_aws_sdk_middleware_signing.awsauthinputconfig-1.html#credentials)
39
+
-**v3**: No change. It can also be an async function that returns credentials.
40
+
See [v3 reference for AwsAuthInputConfig credentials](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/interfaces/_aws_sdk_middleware_signing.awsauthinputconfig-1.html#credentials).
A set of options to pass to the low-level HTTP request. These options are aggregated differently in V3. You can
52
+
A set of options to pass to the low-level HTTP request. These options are aggregated differently in v3. You can
51
53
configure them by supplying a new `requestHandler`. Here's the example of setting http options in Node.js runtime. You
52
-
can find more in [v3 reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/classes/_aws_sdk_node_http_handler.nodehttphandler-1.html).
54
+
can find more in [v3 reference for NodeHttpHandler](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/classes/_aws_sdk_node_http_handler.nodehttphandler-1.html).
53
55
54
56
```javascript
55
57
const { Agent } =require("https");
@@ -69,8 +71,8 @@ might not have the same name either.
69
71
});
70
72
```
71
73
72
-
If the client is suppose to run in browsers, a different set of options is available. You can find more in [v3
@@ -81,15 +83,15 @@ might not have the same name either.
81
83
});
82
84
```
83
85
84
-
Each option of `httpOptions` is specified bellow:
86
+
Each option of `httpOptions` is specified below:
85
87
86
-
-`httpOptions.proxy`
88
+
-`proxy`
87
89
-**v2**: The URL to proxy requests through
88
-
-**v3**: You can set up a proxy with an agent following [this guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-proxies.html)
90
+
-**v3**: You can set up a proxy with an agent following [Configuring proxies for Node.js](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-proxies.html)
89
91
-`agent`
90
92
91
93
-**v2**: The Agent object to perform HTTP requests with. Used for connection pooling.
92
-
-**v3**: You can configure `httpAgent` or `httpsAgent`like in the examples above.
94
+
-**v3**: You can configure `httpAgent` or `httpsAgent`as shown in the examples above.
93
95
94
96
-`connectionTimeout`
95
97
-**v2**: Sets the socket to timeout after failing to establish a connection with the server after connectTimeout
@@ -114,7 +116,8 @@ might not have the same name either.
-**v2**: The maximum amount of retries to perform for a service request.
117
-
-**v3**: Changed to `maxAttempts`. See more in [v3 reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/interfaces/_aws_sdk_middleware_retry.retryinputconfig-2.html#maxattempts). Note that the `maxAttempt` should be `maxRetries` + 1.
119
+
-**v3**: Changed to `maxAttempts`. See more in [v3 reference for RetryInputConfig](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/interfaces/_aws_sdk_middleware_retry.retryinputconfig-2.html#maxattempts).
120
+
Note that the `maxAttempt` should be `maxRetries + 1`.
0 commit comments