You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to read from an S3 bucket hosted in a different region than the client configuration using the Ktor client engine, the following error is observed:
io.ktor.client.features.SendCountExceedException: Max send count 20 exceeded. Consider increasing the property maxSendCount if more is required.
This error is unintuitive and does not correctly indicate the problem or any possible resolutions.
Expected behavior
The API call should throw a clearer error indicating the problem (missing endpoint configuration and/or incorrect region).
Current behavior
The following error is thrown:
Exception in thread "main" io.ktor.client.features.SendCountExceedException: Max send count 20 exceeded. Consider increasing the property maxSendCount if more is required.
at io.ktor.client.features.HttpSend$DefaultSender.execute(HttpSend.kt:121)
at io.ktor.client.features.HttpRedirect$Feature.handleCall(HttpRedirect.kt:95)
at io.ktor.client.features.HttpRedirect$Feature.access$handleCall(HttpRedirect.kt:47)
at io.ktor.client.features.HttpRedirect$Feature$handleCall$1.invokeSuspend(HttpRedirect.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Steps to Reproduce
suspendfunmain() {
val globalConfig =AwsClientConfig.fromEnvironment { }
val s3 =S3Client(globalConfig) {
httpClientEngine =KtorEngine()
}
s3.getObject(GetObjectRequest {
bucket ="aws-sdk-kotlin-api-docs"// Bucket hosted in another region
key ="foo"
}) { }
}
ianbotsf
changed the title
SendCountExceedExcepotion when accessing S3 bucket without permissions via Ktor client
SendCountExceedException when accessing S3 bucket without permissions via Ktor client
Feb 14, 2022
ianbotsf
changed the title
SendCountExceedException when accessing S3 bucket without permissions via Ktor client
SendCountExceedException when accessing S3 bucket in another region via Ktor client
Feb 14, 2022
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
When attempting to read from an S3 bucket hosted in a different region than the client configuration using the Ktor client engine, the following error is observed:
io.ktor.client.features.SendCountExceedException: Max send count 20 exceeded. Consider increasing the property maxSendCount if more is required.
This error is unintuitive and does not correctly indicate the problem or any possible resolutions.
Expected behavior
The API call should throw a clearer error indicating the problem (missing endpoint configuration and/or incorrect region).
Current behavior
The following error is thrown:
Steps to Reproduce
Possible Solution
No response
Context
Originally noted in #525.
AWS Kotlin SDK version used
0.12.0-beta
Platform (JVM/JS/Native)
JVM
Operating System and version
Amazon Linux 2
The text was updated successfully, but these errors were encountered: