Python AWS Lambda Deployment Expert

Job ID: 37734078

Budget: ₹600 – ₹1,500 INR

I have one django application (ml Based). I deployed it on aws lambda using serverless. Size of docker file on ecr is around 1.4gb, and on my local system it is around 3gb.
Same application deployed on ec2 t2 small instance average response time is somewhat 2-5 seconds.
But on aws lambda i am getting request timeout(API Gateway).