Can't load my model on server

I’m using react-three-fiber in my app, locally everything works fine, but after I deploy my app. (I’m using AWS Amplify. for that) i get an error


I don’t know why, locally everything works fine, my hat.glb file is only 10 mb, i don’t think it is too big…
Any advise?

A search for “aws amplify 413 error” yields,

“413 Payload Too Large response status code indicates that the request or response payload is larger than the limit allowed by AWS Lambda . When request payload is larger than allowed size, you will get a 413 request entity too large error in front end.”

If your model isn’t already compressed, you can try to compress it using,

npx gltfjsx ./path/to/model.glb -T