Live data from Hacker News

Ask HN: How was your experience with AWS Lambda in production?

news.ycombinator.com

141–150 of 165 posts

Re: Ask HN: How was your experience with AWS Lambda in production?

#141

Most of my experience mirrors that found in other comments, so here's a few unique quirks I've personally had to work around: - You can't trigger Lambda off SQS. The best you can do is set up a scheduled lambda and check the queue when kicked off. - Only one Lambda invocation can occur per Kinesis shard. This makes efficiency and performance of that lambda function very important. - The triggering of Lambda off Kines…

> You can't trigger Lambda off SQS. The best you can do is set up a scheduled lambda and check the queue when kicked off.

This kills me. I can't believe they haven't added this.

Re: Ask HN: How was your experience with AWS Lambda in production?

#142

Most of my experience mirrors that found in other comments, so here's a few unique quirks I've personally had to work around: - You can't trigger Lambda off SQS. The best you can do is set up a scheduled lambda and check the queue when kicked off. - Only one Lambda invocation can occur per Kinesis shard. This makes efficiency and performance of that lambda function very important. - The triggering of Lambda off Kines…

> You can't trigger Lambda off SQS. The best you can do is set up a scheduled lambda and check the queue when kicked off. This kills me. I can't believe they haven't added this.

IIRC, it's a philosophical argument that prevents it - SQS is pull, Lambda triggers off push. They don't want to add a push mechanism to SQS, ergo they can't support Lambda.

Re: Ask HN: How was your experience with AWS Lambda in production?

#143
I've used it in production and we're building our platform entirely in Serverless/AWS Lambda.

Here are my recommendations:

1) Use Serverless Framework to manage Functions, API-Gateway config, and other AWS Resources

2) CloudWatch Logs are terrible. Auto-stream CloudWatch Logs to Elastic Search Service and Use Kibana for Log Management

3) If using Java or other JVM languages, cold starts can be an issue. Implement a health check that is triggered on schedule to keep functions used in real-time APIs warm

Here's a sample build project I use: https://github.com/bytekast/serverless-demo

For more information, tips & tricks: https://www.rowellbelen.com/microservices-with-aws-lambda-an...

Re: Ask HN: How was your experience with AWS Lambda in production?

#145

Earlier quoted context omitted.

Have you tried out Azure Functions? It has pretty good features for continuous integration, a CLI where you can run locally, and a really nice monitoring experience. Obviously it's probably not worth migrating an existing project, but it might be useful for future projects. Plus, we have a Serverless Framework plugin. Here's a talk that walks through some of our features: https://www.youtube.com/watch?v=TgB-fs1hwlw&t…

I used Azure Functions (when I was a MSFT employee, in fact), and found it to be unusable. A list of complaints: * setup is 100% completely clicky-clicky UI driven, which was a huge pain to scale. instantiation of a Function on behalf of a developer for production use was a huge time sink * it's clearly a thin veneer on Azure Web Services, and the abstractions leak badly in the portal (deployment credentials, for exa…

Thanks for the detailed feedback! I think you probably used Functions when it was much newer, and I think we’ve actually addressed all of your issues.

- You can create a Function App via ARM/CLI/etc., you can write functions without ever touching the portal. See https://docs.microsoft.com/en-us/azure/azure-functions/funct.... You can also now use Visual Studio to author C# functions: https://docs.microsoft.com/en-us/azure/azure-functions/funct...

- It’s true that Functions is built on App Service, but I see that as an advantage. You get all the great features of Continuous Integration, custom domains, automated deployment, etc.

- Indeed, the portal does not do well when auth is enabled and all routes are protected. The problem is that the portal calls admin APIs that are also protected, so it fails. We now have better error messages for this, and we’re tracking this bug: https://github.com/Azure/azure-functions-ux/issues/499

- The Graph API issue is probably not specific to Functions, but it is a bit easier with the Authentication/Authorization feature. Can you provide more detail?

- You can install npm packages at the "root" of your Function and not reinstall them for each Function, just like a normal Node.js app - it walks the directories.

- Our documentation is much better now, and we even have documentation for all bindings in the portal. We also have much better conceptual docs on bindings, see https://docs.microsoft.com/en-us/azure/azure-functions/funct.... We’d welcome any specific feedback on docs that are missing.

- CI should be faster now, it usually takes about 2-3 minutes for commits to show up. It’s fast enough that I’ve demo’d it.

- You can now run locally and debug using the Azure Functions Core Tools (npm i -g azure-functions-core-tools; func init; func host start). See docs: https://docs.microsoft.com/en-us/azure/azure-functions/funct.... This is something that our users always praise us for. We support C# debugging with Visual Studio and JavaScript debugging with VSCode.

- Logs definitely weren't great. Initially, they always went to table storage, but the ones you see streaming in the portal get written to disk to enable the realtime portal stream - they are only written to disk when you're in the portal, so they are "sometimes" there. The good news is that we've tightly integrated Application Insights, which means logs are easy to find. It's easy to alert on failed functions. You can see perf and metric data all in one place without log parsing. For a demo, go to the 6 minute mark of this video: https://www.youtube.com/watch?v=TgB-fs1hwlw&t=6m

Re: Ask HN: How was your experience with AWS Lambda in production?

#146

Hey everyone, I'm Daniel Langer and I help build lambda monitoring products over at Datadog. I see lots of you are unhappy with the current monitoring solutions available to you. If anyone has thoughts on what they'd like in a Lambda monitoring service feel free to email me at daniel.langer@datadoghq.com

I spent a while talking to the Datadog guys at the AWS Sydney summit in April and while the product was compelling, nobody could give me a straight answer on pricing for lambda - all the pricing is given in terms of per host. So I'd have to say the main thing I'm after is pricing transparency...

Re: Ask HN: How was your experience with AWS Lambda in production?

#147

Earlier quoted context omitted.

Oh claudia sounds interesting. I'm a mobile developer who's used express/node before. The hardest thing for me when I was cobbling a backend together with lambda/dynamodb was unterstanding the permission system and debugging it when I configured it wrong. Lots of the examples and articles around this process are out of date and AWS's web front end can be painful to deal with. That said, when everything was setup, it…

Hey, one of the guys from Claudia here. You can have tutorials and examples on the : - Claudia.js website - https://claudiajs.com - Claudia Github examples - https://github.com/claudiajs/example-projects The purpose of Claudia.js is just to make it super easy to develop and deploy your applications on AWS Lambdas, API Gateway, also ease up the work with DynamoDb, AWS IoT, Alexa and so on. There are two additional lib…

Awesome answer, thanks!

Re: Ask HN: How was your experience with AWS Lambda in production?

#148

A couple of months ago, I've started using AWS Lambda for a side project. The actual functions were pretty easy to code using `nodejs` and deploying them with `serverless` but the boilerplate to opening them via an http API was the real bummer. IAMs, routing and all kind of other little things standing in the way of actual productive work. Some time after that I tried to setup GCloud Functions and to my surprise that…

I work for Gcloud functions. happy to help if you need support.

Re: Ask HN: How was your experience with AWS Lambda in production?

#149

Earlier quoted context omitted.

(crap I just typed stuff out and pressed F5...) I haven't tried with a NAT Gateway. This is what I know. If the response is small, the request duration is small. Cloudfront > Gateway > Lambda > RDS (PostgreSQL) Response: 1k | 20ms-60ms 10k | 50ms-90ms 100k | 150ms-200ms 350k | 200ms-450ms That's a rough gauge of what I've experienced. I think the throughput on the gateway is the bottleneck.

Just hit one of our test endpoints Test #1 Lambda run time (140 ms) Total waiting time (354ms) Total time (358ms) Test #2 Lambda run time (300 ms) Total waiting time (490ms) Total time (567ms) Test #3 Lambda run time (139 ms) Total waiting time (479ms) Total time (485ms) This is for a 20kb payload single request. Stack: Custom Domain -> Cloudfront -> API Gateway -> VPC -> Lambda -> NAT Gateway -> ElasticSearch

I'm curious why you have a NAT gateway between your Lambda and Elasticsearch?

Re: Ask HN: How was your experience with AWS Lambda in production?

#150

We run many microservices on Lambda and it has been a pleasant experience for us. We use Terraform for creating, managing environment variables, and permissions/log groups/etc. We use CodeShip for testing, and validating and applying Terraform across multiple accounts and environments. For logging, we pipe all of our logs out of CloudWatch to LogEntries with a custom Lambda, although looking at CloudWatch logs works…

"looking at CloudWatch logs works fine most of the time"...are you kidding? I wanna gouge my eyes out with a rusty spoon every time I have to look at CW logs :)
Post reply on HN