-
Context
QuestionCurrently, we're doing a Our GetItem operation takes an average of BUT unfortunately, we can't decrease our current timeout configuration because it would also impact the timeout configuration of the "provide_credentials" requests that the SDK makes internally (probably to the AWS So, my question is: Is it possible to configure both a specific timeout for our DynamoDB operations (i.e. GetItem) AND another one for the internal/magical call to STS? And if it is, can someone share some code to show how it would look like, please? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hmmm. This is definitely not ideal. I've cut an issue to track making this use-case better. For now, I think you should be able to hack around this with the following: use aws_config::default_provider::credentials;
let sdk_config = aws_config::from_env()
.timeout_config(my_timeout_config()) // or `.http_connector(...)`
// Explicitly set credentials to the default provider to prevent it from
// acquiring the overridden HTTP connector above with the stricter timeout
.credentials_provider(credentials::default_provider().await)
.load()
.await; If you need to programmatically set the region, this gets a little more complicated: use aws_config::default_provider::credentials::DefaultCredentialsChain;
let region = "us-east-1";
aws_config::from_env()
.region(region)
.timeout_config(my_timeout_config()) // or `.http_connector(...)`
// Explicitly set credentials to the default provider to prevent it from
// acquiring the overridden HTTP connector above with the stricter timeout
.credentials_provider(
DefaultCredentialsChain::builder()
.region(region)
.build()
.await,
)
.load()
.await; |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hmmm. This is definitely not ideal. I've cut an issue to track making this use-case better.
For now, I think you should be able to hack around this with the following:
If you need to programmatically set the region, this gets a little more complicated:
use a…