CSS styling is missing after hosting with AWS in Serverless mode.

0

Hello,

I have hosted a Remix JS application in serverless mode with S3 and Lamda functions. Deploying it into serverless using buildspec.yml and serverless.yml. The application hosted properly but CSS styling is missing, the application is trying to load the CSS from https://{domain_name}/_static/build/_assets/app-OAMDP42D.css, but it is getting a 404 response. I checked the s3 bucket, it has the CSS under the server/_assets/app-OAMDP42D.css path. But in AWS Lamda the server folder only has index.js. Can anyone help with how to enable the CSS styling with the S3 bucket and AWS LAMDA? Thanks in advance.

질문됨 2년 전315회 조회
1개 답변
0

Hello,

Good day.

If the 404 error is from S3, it looks like Lambda is referring to an object that does not exist in the bucket. To check what exactly is being sent in the request or if there are any additional characters in the object name which could be causing the issue, we would have to look into the logs for the 404 response. For this, please feel free reach out to us via creating a support case from the support centre dashboard and share the S3 request ID pair with us. You can refer here for details on collecting the request ID pair.

I came across a few external articles (1,2) which discuss about keeping CSS in the S3 bucket and calling it via lambda function which may offer additional guidance.

Thank you.

AWS
지원 엔지니어
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠