Search code examples
phpcssamazon-web-serviceslambdaslim

Why won't my CSS load in AWS Lambda?


I uploaded my Slim project to AWS Lambda following this tutorial: https://cwhite.me/hosting-a-laravel-application-on-aws-lambda/

Since Laravel and Slim are quite similar, I was able to run my project.

However, my stylesheets and JS won't load with the page. console log


Solution

  • I got it. This is because I did not define a route. So, it doesn't return anything. Fixed it by uploading my CSS to S3 instead.