Ask Your Question

Revision history [back]

Yes, using ddbDocClient directly from the utility function or passing it down through the parameters from the handler will have the same effect as both ways will involve using the same instance of ddbDocClient to interact with the DynamoDB table. However, passing it down as a parameter may be considered a better practice as it clearly shows the dependencies of the utility function and makes it more modular and reusable.