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
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.267.0 (2023-02-08)

Bug Fixes

  • prefix error when checking for error status codes (#4419) (f8e86c2)

Features

  • client-backup: This release added one attribute (resource name) in the output model of our 9 existing APIs in AWS backup so that customers will see the resource name at the output. No input required from Customers. (162432f)
  • client-cloudfront: CloudFront Origin Access Control extends support to AWS Elemental MediaStore origins. (8ff16f9)
  • client-glue: DirectJDBCSource + Glue 4.0 streaming options (0593722)
  • client-lakeformation: This release removes the LFTagpolicyResource expression limits. (690ee89)
  • clients: update client endpoints as of 2023-02-08 (4cef2b1)
  • util-dns: add DNS interfaces and initial implementations (#4386) (2b5c0c5)

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 08 Feb 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