another option is to close the connection in sql manager
something else is maybe try initializing the sql connection inside the lambda
not sure about this one but if sql connection is made, layer is replaced, RDS won't know it was updated and we need to close it. an option is to prevent SQL manager to be updated this frequently and see how it affects the issue