-
Hi, What's the approach with the Client in v2 ? I can see that if I cache it then subsequent calls to ExecuteStatement take less time but I'm wondering if it's possible that the Client can get stale and how to detect that. Let's say that I have a µservice interacting with DynamoDB, what if I cache the client when starting up with: and then using: Would it be possible that dynamoClient_instance becomes stale ? In case is there a way to check it before running ExecuteStatement ? Thanks for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @emanuelef , I'm not sure I 100% understand what you are asking. However If I understand you correctly: The The aws Config object is not dynamically produced - so it will remained "cached" in that sense until you construct a new config for your client. hope that's helpful. |
Beta Was this translation helpful? Give feedback.
-
Thanks @RanVaknin, |
Beta Was this translation helpful? Give feedback.
-
Lets break this down:
The client will only retry if two things happen. An error is returned from the service, and that error is retryable.
That is correct. You just want to construct a client once. Just construct the client once and you will be fine. |
Beta Was this translation helpful? Give feedback.
Lets break this down:
The client will only retry if two things happen. An error is returned from the service, and that error is retryable.
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 …