Using Flask Lambda with sam

When i use flask-lambda36 and deploying it to lambda i come across with this error
unexpected error ‘SERVER_NAME’
END RequestId: 5b72df9a-16c4-4ee9-97b0-5ec92c6be666
REPORT RequestId: 5b72df9a-16c4-4ee9-97b0-5ec92c6be666 Init Duration: 0.60 ms Duration: 370.05 ms Billed Duration: 400 ms Memory Size: 128 MB Max Memory Used: 128 MB
{“statusCode”: 500, “headers”: {}, “body”: “internal server error”}

And if I use library flask-lambda i come across with this error
“errorMessage”: “‘SERVER_NAME’”

Anybody who have faced this issue kindly let me know how to solve it. That will be really helpfull