Skip to content

Is it possible to configure both a specific timeout for our DynamoDB operations (e.g. GetItem) AND another one for the provide_credentials part? #681

Answered by jdisanti
Oliboy50 asked this question in Q&A
Discussion options

You must be logged in to vote

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 a…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@Oliboy50
Comment options

@Oliboy50
Comment options

@jdisanti
Comment options

@Oliboy50
Comment options

@jdisanti
Comment options

Answer selected by Oliboy50
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants