Alex, you are calling const deps = await exports.deps() inside the handler. Doesn't that mean every time the handler is executed, it will create an instance of AWS.DynamoDB.DocumentClient. Isn't it recommended for Lambdas to have all your initialization code outside the handler as I assume behind the scenes, it creates a container and stays warm till you keep hitting it periodically. Any initilization outside the handler is called once per container. Just a thought.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Alex, you are calling
const deps = await exports.deps()inside the handler. Doesn't that mean every time the handler is executed, it will create an instance ofAWS.DynamoDB.DocumentClient. Isn't it recommended for Lambdas to have all your initialization code outside the handler as I assume behind the scenes, it creates a container and stays warm till you keep hitting it periodically. Any initilization outside the handler is called once per container. Just a thought.