# I have a question about serverless lambda sessions

**URL:** <https://forum.serverless.com/t/i-have-a-question-about-serverless-lambda-sessions/9002>\
**Category:** Serverless Framework\
**Tags:** aws, lambda, api-gateway\
**Created:** [August 6, 2019, 9:18am UTC](https://forum.serverless.com/t/i-have-a-question-about-serverless-lambda-sessions/9002 "2019-08-06T09:18:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chars](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@chars](https://forum.serverless.com/u/chars)\
**Post date:** [August 6, 2019, 9:18am UTC](https://forum.serverless.com/t/i-have-a-question-about-serverless-lambda-sessions/9002/1 "2019-08-06T09:18:10Z")

</div>

I deployed a site on serverless. I use session internally using express-session, but the session disappears when I refresh the browser.

I checked the cloud watch log of the lambda, and the log was created at the first time, but the log was not created at any moment and a new log was accumulated in the second log stream

So is the session different for each log in the lambda? If not, is there a way to share sessions in serverless?

---

<div class="post-metadata">

**Author:** ![RegNatarajan](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/regnatarajan/32/1393_2.png) [@RegNatarajan](https://forum.serverless.com/u/RegNatarajan)\
**Post date:** [August 7, 2019, 12:30am UTC](https://forum.serverless.com/t/i-have-a-question-about-serverless-lambda-sessions/9002/2 "2019-08-07T00:30:42Z")

</div>

I feel you, man. I had to write a whole new user/session system based on encrypted browser cookies to make my site work on Lambda. That said, it works great. Worth the pain.

---

<div class="post-metadata">

**Author:** ![chars](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@chars](https://forum.serverless.com/u/chars)\
**Post date:** [August 7, 2019, 8:50am UTC](https://forum.serverless.com/t/i-have-a-question-about-serverless-lambda-sessions/9002/3 "2019-08-07T08:50:40Z")

</div>

When I checked the github of express-session, a warning was displayed to configure the store when deploying the product to the store.

But now req.session disappears when user logs in and refreshes after 2-3 minutes

Please let me know how to fix it.
