File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,24 @@ const client = new S3Client({
5252
5353This example sets the backoff at 100ms plus 1s per attempt.
5454
55+ ### MaxAttempts and RetryStrategy
56+
57+ If you provide both ` maxAttempts ` and ` retryStrategy ` , the ` retryStrategy ` will
58+ get precedence as it's more specific.
59+
60+ ``` js
61+ import { S3Client } from " @aws-sdk/client-s3" ;
62+ import { ConfiguredRetryStrategy } from " @aws-sdk/util-retry" ;
63+
64+ const client = new S3Client ({
65+ maxAttempts: 2 , // ignored.
66+ retryStrategy: new ConfiguredRetryStrategy (
67+ 4 , // used.
68+ (attempt : number ) => 100 + attempt * 1000 // backoff function.
69+ ),
70+ });
71+ ```
72+
5573### Further customization
5674
5775You can implement the ` RetryStrategyV2 ` interface.
You can’t perform that action at this time.
0 commit comments