Ask HN: Are you using AWS Lambda in production?

13 points by murukesh_s ↗ HN
I am building a new type of backend as a service solution and would like to weigh your opinion on existing server less solutions. Are you using AWS Lambda or Azure functions or other offerings in production? Are you using Lambda for your main backend or just for event driven support services like consolidating logs or resizing image files? How much is your average monthly spent on Serverless services? What are the main considerations for moving towards Serverless (Cost/Maintenance)?

10 comments

[ 24.3 ms ] story [ 67.8 ms ] thread
I am using AWS Lambda. I use it in our team to create a notification flow to OpsGenie etc. Its been an amazing service so far.
I’m also interested in OPs questions, and additionally would like to hear how many are using Lambda with the API Gateway, and how big of a pain point is cold start.
I use API Gateway to provide an API endpoint powered by Lambda (and deployed via Serverless). It took a few hours to understand the relationships between Gateway and Lambda, the wire a custom domain names with HTTPS, but ones you understand its operating model it runs very well.

'Cold starts' is a complicated topic. AWS will keep your Lambda 'hot' for ~5 minutes since the last invocation - you are not paying for the 5 minutes, but it still sits in their RAM waiting for requests. This means that any request within 5 minutes of the last request does not pay the cold-start price. So I used Pingdom to monitor/ping the endpoint every 5 minutes, thus keeping one instance of the function perpetually 'hot'. Note that this hack will not work if you need high concurrency: you can only keep 1 instance alive. In practice, it's enough for us as one instance can serve most of the traffic in our case.

I don't think it's too bad, about ~1s for a cold start. But let's say you serve your login page with Lambda, every request thereafter could be much faster because your function is no longer cold. 1 slow request, but chances are your user is making more than one, or usually it's a fire and forget like a form submission.

https://hackernoon.com/im-afraid-you-re-thinking-about-aws-l...

Good article! It reflect my experience, but explains the tradeoffs and techniques very well.
Yes, I have built backend services for several e-commerce websites with it, it generally works great.
You meant the entire backend? that's interesting. So you just used lambda as an app server? Will the cold start bother you?
Yes, we use several Lambda for different kinds of backend and user-facing services. We pay $60 to process ~1M requests per month.

Consider the following:

1. It's pretty useful for fast prototyping (lots of demos, codes, etc. available).

2. Write clean code. Develop your logic totally separate from Lambda, you should be able to test it without it. Use Lambda + API gateway basically as an app/web server.

3. Don't deploy Lambdas manually. Use AWS SAM.

I've used serverless to deploy, works super well. I'd like to try out SAM and see how it compares.
I do use heavily aws lambda for production api, 500 endpoints, 100% of the backend is nodejs microservices, 15 to 50 millions api calls per month and cost less than $80 per month. I'm super happy with it