Ask HN: How was your experience with AWS Lambda in production?
71–80 of 165 posts
Re: Ask HN: How was your experience with AWS Lambda in production?
#72Thanks, - Chris
Re: Ask HN: How was your experience with AWS Lambda in production?
#73You don't need to use the API gateway.
Just talk direct to Lambda.
Re: Ask HN: How was your experience with AWS Lambda in production?
#74I made an image hosting tool on Lambda and S3, for internal corporate use. Staff can upload images to S3 via an SPA. The front end contacts the Lambda service to request a pre-signed S3 upload URL, so the browser can upload directly to S3. It works really well. Observations: 1. Took too long to get something working. The common use case of hooking up a Lambda function to an HTTP endpoint is surprisingly fiddly and ma…
Although I've just started using AWS Lambda and think it's a cool technology to use, I can understand your points. 2) Logging is indeed painful! You definitely need a separate tool/system for that. I have created a small CLI tool to view logs of multiple Lambdas which have been deployed using a CloudFormation template: https://github.com/seeebiii/lambdalogs This does not replace a good external system, but it can hel…
Re: Ask HN: How was your experience with AWS Lambda in production?
#75Re: Ask HN: How was your experience with AWS Lambda in production?
#76Re: Ask HN: How was your experience with AWS Lambda in production?
#77- Decouple lambdas with queues and events, SQS, SNS and S3 events are your friends here - Use environment variables - Use step functions to create to create state machines - Deploy using cloudformation templates and serverless framework
Better to use a stream that can trigger Lambdas natively - like SNS or Kinesis.
Re: Ask HN: How was your experience with AWS Lambda in production?
#78For running Java in Lambda, I had to optimize it for Lambda. To decrease processing time (and in the end the bill), I got rid of all reflection for example and though twice when to initialize what and what to make static. Also, Java Cold Start is an issue. I fixed this with creating a Cloudwatch Trigger that executes the Lambda function every minute to keep it hot. Otherwise, after some minutes of no-one calling the…
Re: Ask HN: How was your experience with AWS Lambda in production?
#79- 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 Kinesis can sometimes lag behind the actual kinesis pipeline. This is just something that happens, and the best you can do is contact Amazon.
- Python - if you use a package that is namespaced, you'll need to do some magic with the 'site' module to get that package imported.
- Short execution timeouts means you have to go to some ridiculous ends to process long running tasks. Step functions are a hack, not a feature IMO.
- It's already been said, but the API Gateway is shit. Worth repeating.
Long story short, my own personal preference is to simply set up a number of processes running in a group of containers (ECS tasks/services, as one example). You get more control and visibility, at the cost of managing your own VMs and the setup complexity associated with that.