Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's highly dependent on your usage. If you want a crib job to run that isn't on your production server and it's to run every few hours. Great to schedule that on AWS lambda. EC2 would be more expensive.

Trying to process 1000s of requests on AWS lambda could end up hitting the limits of lambda and cost you more.

I use lambda to process exif data in images as they are uploaded to S3. Which is awesome because it doesn't require services running on the web server and costs me nothing because it comes into the free tier of AWS lambda.



Oh and AWS database access sucks balls. Because you cannot pool connections you must open/close db connections. If you fail to close you will exhaust the database connections quickly and kill your app until the connections expire.


Phillip - have you tried making your database connection in 'static' code? With container re-use (see https://aws.amazon.com/blogs/compute/container-reuse-in-lamb...), you should see multiple invokes going to the same container, and you can use the same connection for all of them. That will only happen if your traffic is high enough.


I find it kinda strange, that in every official doc they talk about how not to rely on this, but every example I find relies on thsi.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: