AWS Lambda vs Elastic Beanstalk

As the experience of working with cloud, after 1y 6m I can give a proper answer for my own question.

Yes. There is a possibility to use API Gateway + Lambda for the entire app as the back end. But you have to manage your most of the app logic from the front end. On there you have to get a risk because the source code can be viewed by the public.

Keeping your all business logic in the client code is not a good practice. And keeping all the logic in the Lambda also not easy or cost effective. The reason is when you making a real world app, you will need thousands of functions. To do one task, you will have to call many functions (Then its a function run time). So it will be very expensive.

Best solution is hosting the backend on Elastic Beanstalk and front end on S3. If you have any heavy task ? then you can make Lambda functions for that.

Lambda is best for CPU bounded functions. But not to have all the application logic on it.


Since you might not be interested in managing the underlying system, you should opt for AWS Lambda + API Gateway.