Skip to content

Client reuse in documentation #1813

Answered by RanVaknin
emanuelef asked this question in Q&A
Discussion options

You must be logged in to vote

What I want to be sure is that if I keep the same instance of dynamoClient_instance that won't get stale, meaning that dynamoClient_instance.ExecuteStatement will always retry and no need to reinstantiate a new newFromDefaultConifg() in case of issues connecting.

Lets break this down:

dynamoClient_instance.ExecuteStatement will always retry

The client will only retry if two things happen. An error is returned from the service, and that error is retryable.

no need to reinstantiate a new newFromDefaultConifg() in case of issues connecting.

That is correct. You just want to construct a client once.
The thing that could get stale is - depending on how you obtain credentials, they might …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@emanuelef
Comment options

Answer selected by emanuelef
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