Skip to content

DynamoDbEnhanced Java Requests - Allow timeout per operation #6121

Open
@hrothwell

Description

@hrothwell

Describe the feature

Using the plain low level DDB java client we are able to use .overrideConfiguration(...) on various requests in order to change behavior per request and not on the entire client level. This does not appear to be possible using the enhanced java client requests.

Example:

// low level request changing timeout for this request
ScanRequest.builder().overrideConfiguration(AwsRequestOverrideConfiguration.builder().apiCallAttemptTimeout(Duration.ZERO).build()).build();

Use Case

When performing a request that I expect might take longer than others I should be able to specify the timeout differently similar to the low level client.

Proposed Solution

Allow .overrideConfiguration(...) on all enhanced requests

Other Information

One proposed solution online is to create a new client with a different timeout, but typically avoid instantiating multiple clients with different configurations as that feels like it goes against best practices of having one client with a shared connection pool.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.0

JDK version used

JDK 17

Operating System and version

macOS Sequoia 15.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    dynamodb-enhancedfeature-requestA feature should be added or improved.p3This is a minor priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions