Read database in lambda function