Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

@ccsalazard's avatar

Deploy Laravel Application with EC2, Load Balancer, Autoscaling, and AWS EFS

Dear community. I am currently trying to deploy an application in Laravel using AWS, Load Balancing, Auto Scaling and EFS, however, I am unable to properly configure the EFS file system mount. The app loads when the instances are replicated and launched, however when I log in I can't log in as I get a 419 - Page Expired error. My guess is that the session file is lost as it is not pointing correctly to the EFS file system. Could you help me with some guide? I am willing to repay your support.

0 likes
3 replies
jlrdw's avatar

Have you switched to database for session driver?

1 like
@ccsalazard's avatar

@jlrdw No. The session driver is still of type File.

'driver' => env('SESSION_DRIVER', 'file'),

Please or to participate in this conversation.