Search code examples
amazon-web-servicesaws-sdkaws-sdk-java-2.0

Whats The AWS SDKV2 equivalent of setSdkClientExecutionTimeout


I have a client with a guaranteed execution timeout setting here (which can be configured per request)

https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/AmazonWebServiceRequest.html#setSdkClientExecutionTimeout-int-

But I cannot find an equivalent for the SDKV2, sync or async.

I was wondering if anyone in SO or AWS would know about this. Is this an intentional feature drop? Or am I missing some other setting.


Solution

  • Found the solution : https://github.com/aws/aws-sdk-java-v2/pull/657#pullrequestreview-799397170. This is for async clients and at client level. if you want to do request level (for async clients), use the orComplete functionality of completable future instead. https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/CompletableFuture.html#orTimeout-long-java.util.concurrent.TimeUnit-