I have an AWS Lambda function that connects to SQL DB and the timeout for lambda has been set to 120 seconds. But when there is some issue with the DB connection or query execution, lambda is getting timed out after 60 seconds. Below is my DB config. I used node-mssql
module.
const DBConfig = {
user: Config.DBUser,
password: pswd,
server: Config.DBHost,
port: Config.DBPort,
database: Config.DBName,
connectionTimeout: 60000,
requestTimeout: 60000,
options: {
encrypt: false
}
}