I have simple API, with connection to DB, calls to FB API etc. What is the best way to serve it.
1) I have started with EC2 first.
Good: Cheap enough. I can control everything
Bad: Long set up process. Need to control everything. Set up monitoring tools etc by myself. Keep in mind a lot.
2) Next I have moved NodeJS to EB and move DB to RDS.
Good: Just commit a code, all other things handled by service
Bad: Load Balancer + Multiple instance + RDS costs a lot.
3) Lambda, thinking about moving to Lambda + API Gateway setup It is look easy to implement, monitoring and support Have no idea how much money it will cost. I know that there is a lot of configuration inside.
Do you have any suggestion what will be the best for simple API? Also I thinking about moving only picture generation to Lambda, and keep simple API like AUTH, GET users etc on EB.
If you are sure that the processing logic does not exceed 5 minutes, then Option 3 will be definitely desired - as you write functions and deploy them in Lambda. No other deployment and auto scaling worries.
Of course, subject to the other factors like dependency on third party libraries for your logic, and compatibility with Lambda underlying image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With