# Using Flask Lambda with sam

**URL:** <https://forum.serverless.com/t/using-flask-lambda-with-sam/14423>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [March 18, 2021, 12:42pm UTC](https://forum.serverless.com/t/using-flask-lambda-with-sam/14423 "2021-03-18T12:42:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rumman001](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/rumman001/32/5406_2.png) [@Rumman001](https://forum.serverless.com/u/Rumman001)\
**Post date:** [March 18, 2021, 12:42pm UTC](https://forum.serverless.com/t/using-flask-lambda-with-sam/14423/1 "2021-03-18T12:42:32Z")

</div>

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
