Skip to content

Commit 8732c51

Browse files
docs: address feedbacks
Co-authored-by: Trivikram Kamat <[email protected]>
1 parent 4825a40 commit 8732c51

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ It returns a function that accepts args, an object that contains the parameters
135135

136136
#### Other Changes
137137

138-
If you are looking for a breakdown of the API changes from v2 to v3, we have them listed in [UPGRADING.md](./UPGRADING.md).
138+
If you are looking for a breakdown of the API changes from AWS SDK for JavaScript v2 to v3,
139+
we have them listed in [UPGRADING.md](./UPGRADING.md).
139140

140141
### Install from Source
141142

UPGRADING.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
# Upgrading Notes (2.x to 3.x)
22

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.
45

56
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:
79

8-
- [modular packages](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)
9-
- [middleware stack](https://aws.amazon.com/blogs/developer/first-class-typescript-support-in-modular-aws-sdk-for-javascript/)
10+
- [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/)
1012

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.
1315

1416
## Client Constructors
1517

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
1820
might not have the same name either.
1921

2022
- [`computeChecksums`](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#computeChecksums-property)
@@ -34,8 +36,8 @@ might not have the same name either.
3436
- **v3**: No change.
3537
- [`credentials`](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#credentials-property)
3638
- **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).
3941
- [`endpointCacheSize`](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#endpointCacheSize-property)
4042
- **v2**: The size of the global cache storing endpoints from endpoint discovery operations.
4143
- **v3**: Not available. Planned. This option configures endpoint discovery behavior, which is not yet available in v3.
@@ -47,9 +49,9 @@ might not have the same name either.
4749
- **v3**: **Deprecated**. SDK _always_ injects the hostname prefix when necessary.
4850
- [`httpOptions`](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#httpOptions-property)
4951

50-
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
5153
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).
5355

5456
```javascript
5557
const { Agent } = require("https");
@@ -69,8 +71,8 @@ might not have the same name either.
6971
});
7072
```
7173

72-
If the client is suppose to run in browsers, a different set of options is available. You can find more in [v3
73-
reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/classes/_aws_sdk_fetch_http_handler.fetchhttphandler-1.html).
74+
If the client is running in browsers, a different set of options is available. You can find more in [v3
75+
reference for FetchHttpHandler](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/classes/_aws_sdk_fetch_http_handler.fetchhttphandler-1.html).
7476

7577
```javascript
7678
const { FetchHttpHandler } = require("@aws-sdk/fetch-http-handler");
@@ -81,15 +83,15 @@ might not have the same name either.
8183
});
8284
```
8385

84-
Each option of `httpOptions` is specified bellow:
86+
Each option of `httpOptions` is specified below:
8587

86-
- `httpOptions.proxy`
88+
- `proxy`
8789
- **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)
8991
- `agent`
9092

9193
- **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.
9395

9496
- `connectionTimeout`
9597
- **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.
114116
- **v3**: **Deprecated**. SDK _does not_ follow redirects to avoid unintentional cross-region requests.
115117
- [`maxRetries`](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#maxRetries-property)
116118
- **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`.
118121
- [`paramValidation`](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#paramValidation-property)
119122
- **v2**: Whether input parameters should be validated against the operation description before sending the request.
120123
- **v3**: **Deprecated**. SDK _does not_ do validation on client-side at runtime.

0 commit comments

Comments
 (0)