While having problems getting setting request timeout on dynamodb/document client (with the v2 SDK, How can the default timeout be set for AWS DocumentClient javascript SDK) I decided to explore switching the the v3 API, since it has certain advantages.
But looking at the full client DynamoDB and more importantly its configuration DynamoDBClientConfig, it seems that there is no way to control the overall request timeout.
Whereas the v2 interface had httpOptions
(which seem not to work in the referenced issue) the v3 configuration does not seem to have any control or even any definition for how long an individual request might wait before timing out (and retrying, or whatever).
Does this now have to be implemented with a custom requestHandler? Is there example code for this in node.js
?
This link about upgrading seems to have an example, in the section about
httpOptions
. There is an obvious typo in the example there. Looking at the code directly, it is apparent that the agent NEED NOT BE SPECIFIED (there are defaults if the agent is not passed) - so this example is sufficient.And this answer - How do I set a timeout for AWS V3 Dynamo Clients - also provides information suggesting how to do this.