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
// ⚠️ byte stream is unhandled, leaving a socket in use.
198
198
```
199
199
200
-
Although the API call is performed and you have access to response, the connection will remain open until the byte stream, or payload, is read or discarded.
200
+
Although the API call is performed, and you have access to response, the connection will remain open until the byte
201
+
stream, or payload, is read or discarded.
201
202
Not doing so will leave the connection open, and in Node.js this can lead to a condition we call socket exhaustion. In
202
203
the worst cases this can cause your application to slow, leak memory, and/or deadlock.
203
204
@@ -231,6 +232,21 @@ if (case1) {
231
232
}
232
233
```
233
234
235
+
To identify _which_ operations contain byte stream response payloads, refer to our API documentation. In the
236
+
"Example Syntax" section of each operation's API reference page, the field that constitutes a byte stream will be marked
237
+
as such:
238
+
239
+
```ts
240
+
// { // GetObjectOutput
241
+
// Body: "<SdkStream>", // see \@smithy/types -> StreamingBlobPayloadOutputTypes
242
+
// ... other fields ...
243
+
// };
244
+
```
245
+
246
+
in the same way
247
+
as [GetObjectCommand](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetObjectCommand/).
248
+
The byte stream field will always be a top-level property of the response object.
249
+
234
250
### (4) Allow more time to establish connections when making requests cross-region
235
251
236
252
This is outside the AWS SDK interfaces but an important consideration when making cross-region requests in AWS when
@@ -246,7 +262,8 @@ The default value of 250ms may be too low for some cross-region pairs within AWS
246
262
opposite sides of the world, or simply in conditions of low network speed. This may manifest as an `AggregateError` with
247
263
code `ETIMEDOUT` in Node.js.
248
264
249
-
To increase this value within your application, use a `node` launch parameter such as `--network-family-autoselection-attempt-timeout=500` or
265
+
To increase this value within your application, use a `node` launch parameter such as
266
+
`--network-family-autoselection-attempt-timeout=500` or
0 commit comments