Skip to content

waitUntilObjectExists throws WaiterConfiguration.minDelay must be greater than 0 when minDelay is 0.5 #6767

@razbensimon

Description

@razbensimon

Checkboxes for prior research

Describe the bug

waitUntilObjectExists method throws WaiterConfiguration.minDelay must be greater than 0 error if minDelay is 0.5.
I see you are using @smithy/util-waiter which throws it here.

0.5 is greater than 0, the condition and error are not synced.

This means that I can't wait for an s3 object with an exponential backoff policy to start at 0.5 seconds.

Is there any workaround?

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/[email protected]

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v20.12.2

Reproduction Steps

call:

import {
  type HeadObjectCommandInput,
  S3Client,
  waitUntilObjectExists
} from '@aws-sdk/client-s3';

  const fileParams = {
    Bucket: 'bucket-name',
    Key: 'my-key'
  } satisfies HeadObjectCommandInput;

await waitUntilObjectExists({ 
  client,
  minDelay: 0.5, // exponential backoff floor (seconds)
  maxDelay: 1, // exponential backoff ceiling (seconds)
  maxWaitTime: 30
 }, fileParams);

Observed Behavior

Error: WaiterConfiguration.minDelay must be greater than 0

Expected Behavior

An exponential backoff policy should work, starting with 500ms delay

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Labels

bugThis issue is a bug.p2This is a standard priority issuequeuedThis issues is on the AWS team's backlog

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions