Skip to content

Commit

Permalink
docs(util-retry): mention maxAttempts configuration in default case (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed May 19, 2023
1 parent 14810d3 commit 42f526e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/util-retry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ const client = new S3Client({}); // default retry strategy included.

### MaxAttempts

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

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

const client = new S3Client({
// custom max number of attempts.
retryStrategy: new StandardRetryStrategy(4),
});
const client = new S3Client({ maxAttempts: 4 });
```

This is recommended because the `StandardRetryStrategy` includes backoff calculation,
Expand Down

0 comments on commit 42f526e

Please sign in to comment.