I am trying to understand if my Dynamodb connection closes each time I execute a command
const dboperation1 = async(param) =>{
const docClient = new AWS.DynamoDB.DocumentClient();
const result = await docClient.query(params).promise();
return result
}
Considering the above example each time I call dboperation1 would it lead to connection establishment to DynamoDb first.
If so how can I keep some connections open already so that I could readily use them to query the db avoiding the extra time taken to set up the connection ? basically trying to avoid the initial handshake that takes place.