【发布时间】:2021-03-13 03:48:47
【问题描述】:
我试图了解每次执行命令时我的 Dynamodb 连接是否关闭
const dboperation1 = async(param) =>{
const docClient = new AWS.DynamoDB.DocumentClient();
const result = await docClient.query(params).promise();
return result
}
考虑到上面的示例,每次我调用 dboperation1 时都会先建立到 DynamoDb 的连接。
如果是这样,我怎样才能使一些连接保持打开状态,以便我可以轻松地使用它们来查询数据库,从而避免设置连接所花费的额外时间?基本上是试图避免发生的初始握手。
【问题讨论】:
标签: node.js amazon-web-services amazon-dynamodb