Unable to deploy dbauth on AWS Lambda along with API gateway

I have created the basic DBAuth fucntionality using the yarn commands.

Also did CORS config as per :

Then I have build the api side and zip it using below commands:

yarn rw build api
yarn zip-it-and-ship-it dist/functions/ zipballs/

Uploaded the zip files to individual lambda manually
Lambda configured to use auth.handler , graphql.handler respectively

My web side is deployed on EC2 appache server

On the browser console I always get 404 and it uses correct API url


Sample request payload from web side request -


On Lambda logs I only see below :slight_smile:
INIT_START Runtime Version: nodejs:18.v8 Runtime Version ARN: arn:aws:lambda:ap-south-1::runtime:2755dc322c8dbb64760145d6403d14432af527bf4dd3cf03713aae10e0f8b552
START RequestId: 4c10cff2-15b0-4b9b-adb7-290590c7d681 Version: $LATEST
END RequestId: 4c10cff2-15b0-4b9b-adb7-290590c7d681
REPORT RequestId: 4c10cff2-15b0-4b9b-adb7-290590c7d681 Duration: 18.19 ms Billed Duration: 19 ms Memory Size: 1024 MB Max Memory Used: 98 MB Init Duration: 740.30 ms

I have tried this for hours and I need help in deploying the DBAuth to lambda , database is properly configured and everything works on local machine with same DB

Hi @meraj64 and welcome to our community,

While trying a couple of things on AWS I found that my apps were more stable when setting at least 2gb of RAM - have you tried it at such capacity? Might be a long shot but that would clear an esoteric possibility out of the way.

1 Like