TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How has your experience with AWS Lambda been?

42 pointsby z0aabout 7 years ago
I&#x27;ve been thinking about trying out AWS Lambda for my next project and would just like to survey the community: how are you currently using Lambda (i.e. current setup, the product, etc)? How has the cost, performance, and scalability been? Any issues or deal-breakers? Would you use Lambda for your next project?<p>Thanks!

13 comments

dev_throwabout 7 years ago
In my experience so far (devOps and managing infrastructure) it is a great way to run one-off scripts in Python, JS and now Golang to invoke other services (eg. step functions, or other lambdas), publish to SNS topics or describe tables in dynamo, you get the gist. The advantage is that you only get charged for the time you use it, and their free tier is generous, so our bills from Lambda are negligible.<p>The paradigm I use is that of treating Lambda as &quot;glue&quot; between services, and it has worked out amazingly well for that. Quick invocations, seemingly infinite scaling. CW logs (monitoring) could be better, but tools like Apex help with parsing them.
ajoyabout 7 years ago
AWS lambda should be thought of as functions that can be scaled independently.<p>I can write the functions in any one of the languages that are supported and they are all interlace-able through an interface. If I need to use ML and prefer python libraries, I can do that and call python from a nodejs function or vice-versa. All this without having to worry abt keeping a server up and secure and scaling.<p>There are issues with loading times and cost, but easily the best thing that happened for me as a single dev proving out a product MVP.
评论 #16556905 未加载
shady-ladyabout 7 years ago
I tried using API Gateway and Lambda to create some dumb endpoints late last year (most just return static data with some returning updateable data).<p>All endpoints&#x2F;operations exposed through API Gateway.<p>Thought it would be a lot simpler to set up than it was. It&#x27;s pretty convoluted doing API Gateway -&gt; Lambda, especially when you make changes.<p>I had thought it would be way simpler. single click define endpoint, then just write some code.<p>The AWS UI most definitely got in the way trying to accomplish this.
finaliterationabout 7 years ago
Background: I just started a systems integration project that leverages Lambda pretty heavily as part of a messaging API. Behind an API Gateway Lambda functions will be responsible for processing initial message requests, routing the requests to certain SQS queues based on certain criteria, and then making requests to other systems as messages come into the various queues. Each of these parts of the process have their own set of functions that will run independently. I’m writing my Lambda functions using C#&#x2F;.NET Core 2.0 (I started with Go initially but I’ve used C# before and find that I personally prefer it).<p>So far I think the development process has been good. Deployment has been okay, and I’ve found it easier to deploy my .NET functions vs the old Go functions.<p>Logging&#x2F;debugging is a bit of a chore but not awful. Cloudwatch alarms are fairly useful for knowing when something critical happened, but you still have to dig in fairly deep to find the relevant error information.<p>Performance wise, Go was really fast even with the smallest amount of memory. Cold starts were around 1s and requests after that were around 30-40ms on average. C# is substantially slower unless you bump up the memory.<p>All that being said, overall I really enjoy developing Lambda functions and not having to worry about containers, etc., because I’m not a DevOps person. I would definitely use it again for other projects, and probably will.
dmlittleabout 7 years ago
We&#x27;ve been using AWS Lambda function to asynchronously render PDFs, transform data or execute on different pipeline triggers with success for a few years now. The horizontal scaling that avoids having a pressured queue during high-traffic spikes is pretty nice.<p>Another case we&#x27;ve had success with is transforming and relaying webhooks from different services (relaying events into Datadog for services that don&#x27;t have a native integrations) or acting on occasional webhooks that don&#x27;t happen too often (creating a default set of labels on a new Github repo).<p>If you&#x27;re doing anything asynchronously, it&#x27;s pretty nice. Be aware that the amount of memory you allocate to your functions is directly proportional to the CPU amount (and price) you&#x27;re given. There&#x27;s also the caveat that invocations perform _at least once_ but not necessarily once. A few months ago we saw a significant increase in repeat lamdaba invocations&#x2F;retries even when the original execution was successful.
billconanabout 7 years ago
I’m also curious about it. My friend who have used it told me it’s difficult to debug. Is it true?
Immortalinabout 7 years ago
The idea looks good on paper but in practice it is pretty pricey and impractical. You get free sandboxing, scaling, and stateless deployment out of the box but are charged by the second. It&#x27;s really optimized for simple web apps (or microservices) - think backend for form processing or resizing a picture. Anything moderately complex e.g. python scientific software is impossible due to the 50MB compressed app size limit (including all your dependencies), if your app takes more than a couple seconds of compute time, it will burn a hole in your pocket.<p>Usage: Algorithmic trading, Alexa voice apps, Brokerage price matching<p><a href="http:&#x2F;&#x2F;KloudTrader.com" rel="nofollow">http:&#x2F;&#x2F;KloudTrader.com</a>
评论 #16556871 未加载
scrollawayabout 7 years ago
Started using Lambda 2 years ago now and my thoughts of it have evolved over time. I was initially frustrated by it but a lot of the pain points have disappeared over time (especially no Python 3 support; now supports 3.6).<p>Some random thoughts and gotchas in no particular order:<p>1. Don&#x27;t do your own deployments. Use Serverless.js (<a href="https:&#x2F;&#x2F;github.com&#x2F;serverless&#x2F;serverless" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;serverless&#x2F;serverless</a>). It&#x27;s in JS but that doesn&#x27;t lock you into the nodejs lambdas, it can deploy to any of the runtimes.<p>2. Use Zappa if you want to host a &quot;serverless website&quot;. But frankly, serverless websites are only for hobby projects right now.<p>3. CPU vs Memory scaling sucks. You have to scale both at once; you can&#x27;t do high CPU&#x2F;low memory. This hurts the wallet for compute-intensive tasks.<p>4. 5-min hard timeout on all functions. Don&#x27;t use Lambda for long-running tasks.<p>5. Low-CPU lambdas (128MB tier) are terrible at cold starts if you have lots of stuff to import (which WILL BE THE CASE for Zappa applications!). If a cold start exceeds your timeout (which defaults to 30 sec), your Lambda will never complete and never get out of cold start.<p>6. If you&#x27;re playing with S3, PUTs will hurt your wallet. A common application of Lambda (the famed &quot;resize images&quot; example) has a workflow that looks like this: GET on API gateway, PUT to s3, triggers an event which fires a Lambda, lambda processes payload, PUTs result back to S3. If processing your payload is fast, the PUTs in this case could be the most expensive part of your flow.<p>7. X-Ray is atrociously confusing.<p>8. No cloudwatch metrics for memory usage. Had to do my own using log metrics. Dumb.<p>9. There&#x27;s a cool versioning system for the code artifact, kinda like ECS has. It&#x27;s really nice to use except that unlike ECS it doesn&#x27;t have native lifecycle rules, which means you have to do your own cleanups. <i>Dumb</i>.<p>10. Lambda patterns can be implemented more cheaply and more efficiently using tasks queues and autoscaling EC2s. Amazon&#x27;s &quot;efficient&quot; compute allocation is outweighed by the margins on Lambda pricing. As with other Amazon services, you&#x27;re paying for the system to be managed.<p>11. Aurora Serverless is super interesting, but FWICT nowhere near ready for prime time.<p>12. API gateway is a solution looking for a problem. If you have to use it (eg. you <i>must</i> trigger your lambda through an http request and you don&#x27;t want to run a web server), use it in proxy mode.<p>13. Golang lambdas are very promising. I want to try them out.<p>14. There&#x27;s a native canary system in Lambda&#x2F;APIGW nowadays. Also want to try it out. Had to roll my own before it existed and now too scared to touch the production system.<p>15. If you hit concurrency issues, your problem might not be load, it might be throughput. Is your DB slower than usual? Common pattern: Increase in Lambda requests hitting your DB, slows your DB down, which in turn slows your lambdas down, which causes you to hit concurrency limits. All these metrics are tightly related.<p>16. Your tests should not assume a Lambda environment unless your app actually depends on the lambda environment (it generally shouldn&#x27;t).<p>17. Use this thing: <a href="https:&#x2F;&#x2F;github.com&#x2F;lambci&#x2F;docker-lambda" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lambci&#x2F;docker-lambda</a> - Among other things, you can use it to build binary libs&#x2F;dependencies you want to run on Lambda (cairo for example).<p>18. Use this thing: <a href="https:&#x2F;&#x2F;github.com&#x2F;spulec&#x2F;moto" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;spulec&#x2F;moto</a> -- And also this thing: <a href="https:&#x2F;&#x2F;github.com&#x2F;localstack&#x2F;localstack" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;localstack&#x2F;localstack</a><p>19. Cloudwatch logs suck. If you want your app to be debuggable, make sure you know how to find logs for individually-triggered lambdas (eg. if you&#x27;re thumbnailing, you should be able to trace the logs for that one thumbnail back into cloudwatch easily)<p>20. Use Sentry. <a href="https:&#x2F;&#x2F;sentry.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sentry.io&#x2F;</a> - You can use the Sentry extra context parameters to help auditing various things (lambda environment, aws api results you get at runtime, etc)
评论 #16557588 未加载
jonathan-kosgeiabout 7 years ago
I used API Gateway and Lambda to serve 20M API calls last month on ipdata.co for a little over $100.<p>Something to note, latencies decrease with increased usage due to fewer cold starts. I&#x27;ve seen latencies as low as 17ms in our busiest region with ~40ms in less busy regions.
pan69about 7 years ago
I never really understood why people would want to build &quot;applications&quot; on top of Lambda. I have always been under the impression that the primary function of Lambda is to assist in programming the AWS environment (in conjunction with SNS and SQS).
leetbulbabout 7 years ago
Expensive, especially if you are utilizing API Gateway. Otherwise, it&#x27;s amazing.
d--babout 7 years ago
I gave it a shot because my api was fairly simple and I really did not want to go through the hassle of setting up a server. The overhead turned out to be massive, like half a second per query. So I ditched it for node.
lvhabout 7 years ago
Running a pretty simple app on Lambda: take DMARC reports, parse them, ship them off to somewhere useful. Same app deploys to Lambda+SES and Google App Engine.<p>Lambda app: just keeps chugging. GAE app: perpetual disaster.