Live data from Hacker News

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

news.ycombinator.com

91–100 of 165 posts

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

#91
I deployed a couple AWS lambda endpoints for very low-volume tasks using claudia.js - Claudia greatly reduces the setup overhead for sane REST endpoints. It creates the correct IAM permissions, gateway API and mappings.

Claudia.js also has an API layer that makes it look very similar to express.js versus the weird API that Amazon provides. I would not use lambda + JS without claudia.

For usage scenarios, one endpoint is used for a "contact us" form on a static website, another we use to transform requests to fetch and store artifacts on S3. I can't speak toward latency or high volume but since I've set them up I've been able to pretty much forget about them and they work as intended.

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

#92
post #40

I tried using Lambda, but need to set up the API gateway before using as well. Painful logging and parameter forwarding.

That makes no sense, API Gateway can proxy requests directly to lambda, and in C# there's Nancy / Web API middleware.

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

#93
Lots of great comments here. I'd like to add that being limited to 512mb of working disk space at /tmp has been a stumbling block for us.

Would be really great to have this configurable along with CPU/memory.

Additionally being able to mount and EFS volume would be very useful!

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

#94
post #89

Can anyone speak to continuous deployments with Lambda, where downtime is not an option? Is it possible to run blue green deployments?

If downtime is an not an option, Lambda is not the solution. Amazon will automatically shut down instances of your Lambda if they haven't been used (~5-15 minutes), and starting a fresh Lambda has noticeable latency. So, some people have resorted to periodically querying their Lambda to prevent this. However, occasionally Amazon will reset all Lambdas, which will force the hard restart.

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

#95
We use Lambda extensively at https://emailoctopus.com. The develop-debug cycle takes a while, but once you're up and running, the stability is hard to beat. Just wish they'd raise that 5 minute execution limit so we can migrate a few more scripts.

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

#96
post #89

Can anyone speak to continuous deployments with Lambda, where downtime is not an option? Is it possible to run blue green deployments?

If downtime is an not an option, Lambda is not the solution. Amazon will automatically shut down instances of your Lambda if they haven't been used (~5-15 minutes), and starting a fresh Lambda has noticeable latency. So, some people have resorted to periodically querying their Lambda to prevent this. However, occasionally Amazon will reset all Lambdas, which will force the hard restart.

I'm aware of the increased startup latency for functions haven't been recently used, but that's not the same as downtime or dropped connections.

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

#97
post #8

Best to keep your workloads as small as possible, cold starts can be very bad, depending on the type of project. Been using mostly node myself, and it's worked out well. One thing to be careful of, if you're targeting input into dynamodb table(s), then it's really easy to flood your writes. Same goes for SQS writes. You might be better off with a data pipeline, and slower progress. It really just depends on your use…

> Best to keep your workloads as small as possible, cold starts can be very bad, depending on the type of project.

Here's a recent, interesting article on the topic that quantifies some of this: https://read.acloud.guru/does-coding-language-memory-or-pack...

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

#98
I worked on a project where the architect wanted to use Lambdas for the entire solution. This was a bad choice.

Lambdas have a lot of benefits - for occasional tasks they are essentially free, the simple programming model makes them easy to understand in teams, you get Amazon's scaling and there's decent integration with caching and logging.

However, especially since I had to use them for whole solution, I ran into a ton of limitations. Since they are so simple, you have to pull in a lot of dependencies which negate a lot of the ease of understanding I mentioned before. The dependencies are things like Amazon's API Gateway, AWS Step Functions, and AWS CLI itself, which is pretty low-level. So now, the application logic is pretty easy, but now you are dealing with a lot of integration devops. There's API Gateway is pretty clunky and surprisingly slow. Lambdas shut themselves down, and restarting is slow. The Step Functions have a relatively small payload limit that needs to be worked around. Etc. So use them sparingly!

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

#99
Can talk only about the node.js runtime with native add-ons. Using it for various automation tasks less then 100 invocations a day where it is the most convenient solution out there for peanuts. We also use it for parsing Swagger/API Blueprint files, here we talk 200k+ invocations a day and works great once we figured out logging/monitoring/error handling and limited output (6MB). We do not use any framework because they mostly are not flexible enough but apex (http://apex.run/) and serves us well. We've hit couple of times some limits but as it is invocation per request only some calls failed and the whole service was unaffected. I see the isolation as a big benefit you get. One thing which sucks is that if it fails (and it is not your code) often you have no idea why and if anything can be done. We use it together with AWS API Gateway and the Gateway part is sub par. The gateway does not support correct HTTP like 204 always returns a body and god forbid if you want something else than application/json. To sum it up lambda is great with some minor warts and the API gateway is OK but can easily imagine it much better.

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

#100
post #38

Earlier quoted context omitted.

> What do you mean by retries If there is an error, the function will be retried: http://docs.aws.amazon.com/lambda/latest/dg/retries-on-error... > Why would you upload node_modules It is required to: http://docs.aws.amazon.com/lambda/latest/dg/nodejs-create-de...

The node_modules one is rubbish IMO, I think their doco is absurd. You can just compile things down using webpack or such, this makes the package smaller and can be optimized for faster execution as well. The retry one is new to me, need to read more about it. Thanks for the info.

Does webpack work for node.js code? I was under the impression that webpack was specifically for front end code.
Post reply on HN