Hi, I am trying to port my full stack JavaScript app(React + Express) into Lambda. Got all the SAM local environment setup working but for some reason the public html + JS files are not being sent correctly to the front end. Could it be a problem in my yaml file?
I have no idea why I’m getting this MIME type error, in local run everything works fine:
This is what my project structure looks like:
/dist/
lambda.js
template.yml
public/index.html
public/bundle.js
server/server.js
this is my current YAML file:
AWSTemplateFormatVersion : ‘2010-09-09’
Transform: AWS::Serverless-2016-10-31
Description: My first serverless application.
Resources:
App:
Type: AWS::Serverless::Function
Properties:
Handler: lambda.handler
Runtime: nodejs6.10
Events:
GetResource:
Type: Api
Properties:
Path: /
Method: any