Skip to content

Commit 2edfef9

Browse files
authored
docs: update for S3 streaming bodies
1 parent 27a4cd3 commit 2edfef9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

supplemental-docs/CLIENTS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,11 @@ your SDK Client, there are two things to check:
282282
throughput needs.
283283
2. Because `keepAlive` is defaulted to `true`, if you acquire a streaming response,
284284
such as `S3::getObject`'s `Body` field. You must read the stream to completion
285-
in order for the socket to close naturally.
285+
in order for the socket to close naturally. You can also destroy the stream in Node.js with
286+
e.g. `(await s3.getObject(...)).Body.destroy()` if it is a Node.js Readable stream.
287+
Specifically in the case of S3, if you don't need the object body,
288+
consider whether the object metadata can be retrieved with another operation such as
289+
`HeadObject` or `GetObjectMetadata`.
286290

287291
```ts
288292
// Example: reading a stream to allow socket closure.

0 commit comments

Comments
 (0)