Open kevvurs opened 4 years ago
Hi @kevvurs. I agree that this is suspicious default behavior. Our team will evaluate options.
Meanwhile, please note that you can supply your own RetryPolicy
to most any client you configure in the SDK. To do, provide one to a ClientConfiguration
object while constructing an SDK client:
val policy = RetryPolicy(retryCondition, backOffStrategy, 3, false)
val config = ClientConfiguration().withRetryPolicy(policy)
val s3 = AmazonS3Client(config)
See:
Thanks for the update. I did implement a custom RP to resolve the issue. The exclusion of STE from the default policy was a "gotcha" for me though.
State your question What's the rationale for explicitly not retrying connection failures in the default policy in AWS SDK Android?
As a user of AWS SDK Android, I was surprised to see the default retry condition specifically excludes exceptions from being retried if they are caused by InterruptedIOException.
A super common issue I have seen for Android is poor connectivity, leading to
SocketTimeoutException
, occurring when the device tries to access AWS resources. SinceSocketTimeoutException
is a subclass ofInterruptedIOException
, related connection issues are not retried with the default AWS SDK retry policy.Which AWS Services are you utilizing? STS and SSM
Provide code snippets (if applicable)
SDKDefaultRetryCondition
:Environment(please complete the following information):
!(exception.getCause() instanceof InterruptedIOException
is in your main branch and was excluded from retry conditions 5 years ago.Device Information (please complete the following information): Any