Socket
Socket
Sign inDemoInstall

@aws-sdk/util-retry

Package Overview
Dependencies
2
Maintainers
5
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aws-sdk/util-retry

Shared retry utilities to be used in middleware packages.


Version published
Maintainers
5
Install size
150 kB
Created

Package description

What is @aws-sdk/util-retry?

The @aws-sdk/util-retry package is part of the AWS SDK for JavaScript v3. It provides utilities to add retry functionality to the AWS SDK operations. This package is designed to help manage retries in a more efficient and customizable way, allowing developers to handle transient errors by repeating requests without having to implement their own retry logic.

What are @aws-sdk/util-retry's main functionalities?

Configuring retry strategies

This feature allows developers to configure retry strategies, specifying how many times an operation should be retried before giving up. The `StandardRetryStrategy` is a built-in strategy that can be used to automatically handle retries according to the SDK's standard logic.

const { StandardRetryStrategy } = require('@aws-sdk/util-retry');
const retryStrategy = new StandardRetryStrategy(maxAttempts);

Custom retry strategy

Developers can extend the `RetryStrategy` class to implement custom retry logic. This allows for fine-grained control over when and how retries should be performed, based on the specific needs of the application.

const { RetryStrategy } = require('@aws-sdk/util-retry');
class MyRetryStrategy extends RetryStrategy {
  constructor(maxAttempts) {
    super();
    this.maxAttempts = maxAttempts;
  }
  shouldRetry(error) {
    // Custom logic to determine if a retry should be attempted
  }
  delayBeforeNextRetry(retryCount) {
    // Custom logic to determine the delay before the next retry
  }
}

Other packages similar to @aws-sdk/util-retry

Changelog

Source

3.289.0 (2023-03-10)

Features

  • client-ivschat: This release adds a new exception returned when calling AWS IVS chat UpdateLoggingConfiguration. Now UpdateLoggingConfiguration can return ConflictException when invalid updates are made in sequence to Logging Configurations. (8b55eb1)
  • client-secrets-manager: The type definitions of SecretString and SecretBinary now have a minimum length of 1 in the model to match the exception thrown when you pass in empty values. (4382b4e)
  • clients: update client endpoints as of 2023-03-10 (feb6f9b)

Readme

Source

@aws-sdk/util-retry

NPM version NPM downloads

An internal package

This package provides shared utilities for retries.

Usage

You probably shouldn't, at least directly.

Keywords

FAQs

Last updated on 10 Mar 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc