Socket
Socket
Sign inDemoInstall

@aws-sdk/util-retry

Package Overview
Dependencies
Maintainers
5
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/util-retry - npm Package Compare versions

Comparing version 3.329.0 to 3.337.0

6

package.json
{
"name": "@aws-sdk/util-retry",
"version": "3.329.0",
"version": "3.337.0",
"description": "Shared retry utilities to be used in middleware packages.",

@@ -27,7 +27,7 @@ "main": "./dist-cjs/index.js",

"dependencies": {
"@aws-sdk/service-error-classification": "3.329.0",
"@aws-sdk/service-error-classification": "3.337.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"@aws-sdk/types": "3.329.0",
"@aws-sdk/types": "3.337.0",
"@tsconfig/recommended": "1.0.1",

@@ -34,0 +34,0 @@ "@types/node": "^14.14.31",

@@ -25,12 +25,8 @@ # @aws-sdk/util-retry

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 });
```

@@ -60,2 +56,20 @@

### MaxAttempts and RetryStrategy
If you provide both `maxAttempts` and `retryStrategy`, the `retryStrategy` will
get precedence as it's more specific.
```js
import { S3Client } from "@aws-sdk/client-s3";
import { ConfiguredRetryStrategy } from "@aws-sdk/util-retry";
const client = new S3Client({
maxAttempts: 2, // ignored.
retryStrategy: new ConfiguredRetryStrategy(
4, // used.
(attempt: number) => 100 + attempt * 1000 // backoff function.
),
});
```
### Further customization

@@ -62,0 +76,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc