Skip to content

Commit 42f526e

Browse files
authored
docs(util-retry): mention maxAttempts configuration in default case (#4738)
1 parent 14810d3 commit 42f526e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/util-retry/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@ const client = new S3Client({}); // default retry strategy included.
2222

2323
### MaxAttempts
2424

25-
If you want to change the number of attempts, you can use the `StandardRetryStrategy` from `@aws-sdk/util-retry`.
25+
If you want to change the number of attempts, you can provide `maxAttempts` configuration during client creation.
2626

2727
```js
2828
import { S3Client } from "@aws-sdk/client-s3";
29-
import { StandardRetryStrategy } from "@aws-sdk/util-retry";
3029

31-
const client = new S3Client({
32-
// custom max number of attempts.
33-
retryStrategy: new StandardRetryStrategy(4),
34-
});
30+
const client = new S3Client({ maxAttempts: 4 });
3531
```
3632

3733
This is recommended because the `StandardRetryStrategy` includes backoff calculation,

0 commit comments

Comments
 (0)