Live data from Hacker News

AWS Lambda pricing now per ms

aws.amazon.com

221–230 of 291 posts

Re: AWS Lambda pricing now per ms

#221
post #26

Earlier quoted context omitted.

I've got bad experiences with go startup (i.e., cold runs). They're much more expensive than I would have expected. If node can indeed run in 40ms (as https://news.ycombinator.com/item?id=25267211 says), then I'm surely going back to JS.

What is your experience? Go is an AOT compiled language so the only thing I could imagine you running into on startup is loading the binary into memory? Theres not a cold-start issue with Go, as its not an optimizing JIT. Edit: Bizarre. Seems like Go on lambda does actually have slower cold start than JS or Python. I wonder if its just that the binary is likely larger than the equivalent JS source code? https://level…

Go is not AOT compiled.

Re: AWS Lambda pricing now per ms

#222
post #167

I hope Azure follows this move soon :)

They might change their 128MB rounding-up structure but they already had per 1ms pricing with the minimum execution time and memory for a single function execution being 100ms and 128MB respectively.

(Google do per 100ms and have 6 pre-defined memory sizes to pick from).

Re: AWS Lambda pricing now per ms

#223

Earlier quoted context omitted.

I haven’t heard that lambdas are “underpowered” before, but I’m interested to learn more. Could you elaborate just a bit on why they are underpowered?

As was mentioned by qvrjuec in a sibling comment, hardware is limited. I seem to remember CPU speeds listed alongside available memory for AWS Lambdas, but the pricing page seems to just list memory now[0]. At the highest end, you're still limited to ~10.2GB of memory, which is considerably lower than what's available via EC2. And while I have no personal experience with the EC2 finer-grained pricing that was announc…

> We can nitpick on these architectural details, but my response was largely that there are other architectural alternatives that could be more ideal; especially in response to a comment that seems to dismiss the value of pricing at finer time intervals.

Not trying to nitpick anything; just curious what was meant by "underpowered". Seems like there's still a breadth of compute-intensive use cases that are more appropriate for lambda--e.g., cost is more sensitive than latency and I have too low a volume of requests for a dedicated EC2 instance to make economic sense. This has been where I've spent most of my career, but no doubt there are many use cases where this doesn't hold.

Re: AWS Lambda pricing now per ms

#224

Earlier quoted context omitted.

They're not easily comparable (I tried using Cloudflare Workers before going back to AWS). Lambda@Edge runs Node or Python. Cloudflare Workers runs V8 with "worker isolates" which has a few more caveats, an imperfect but improving dev experience, and doesn't work with a lot of npm packages.

What would be really useful for my use case (running browser tests on a schedule) is if Cloudflare workers actually supported running full headless chromium automation in addition to just V8 isolates. Right now I'm using puppeteer/playwright + Lambda, but would love to have more options.

Headless browser tests seem to be quite far away from the problems cloudflare workers are trying to solve.

https://developers.cloudflare.com/workers/platform/limits

Workers aren't the same as lambdas, they are a super slim JS environments. At 50ms max runtime most browsers won't even start, let alone fetch and process a page.

Re: AWS Lambda pricing now per ms

#225
post #56

Earlier quoted context omitted.

Awesome! That was the idea here. Lots of sub 100ms workloads and we really want you to be able to pay for what you use. - Chris, Serverless@AWS

Hey Chris. Happy to see your awesome trajectory from Meetup admin to The Serverless AWS guy.

::waves at Yuri::

Thanks! It's been a fun/interesting 4 years in this space :)

Re: AWS Lambda pricing now per ms

#226
post #56

For reference - Lambda functions used to billed at 100ms intervals. My Node.Js function usually only takes 37-40ms to run. So this is a pretty good advancement for cost savings.

Awesome! That was the idea here. Lots of sub 100ms workloads and we really want you to be able to pay for what you use. - Chris, Serverless@AWS

I have only a lambda@edge function which usually runs between 10-20ms.

If this also covers lambda@edge, this will save us quite some money.

Re: AWS Lambda pricing now per ms

#227

Earlier quoted context omitted.

They're not easily comparable (I tried using Cloudflare Workers before going back to AWS). Lambda@Edge runs Node or Python. Cloudflare Workers runs V8 with "worker isolates" which has a few more caveats, an imperfect but improving dev experience, and doesn't work with a lot of npm packages.

What would be really useful for my use case (running browser tests on a schedule) is if Cloudflare workers actually supported running full headless chromium automation in addition to just V8 isolates. Right now I'm using puppeteer/playwright + Lambda, but would love to have more options.

CloudWatch Synthetics may fit your usecase? https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitori...

Then there are more specialized browser-testing providers like LambdaTest.com and BrowserStack.com

Re: AWS Lambda pricing now per ms

#228

I am impressed that computation is billed by the ms nowadays. I'm an ignorant in AWS Lambda but how do you know if their ms measurement is accurate? Is there any way to verify this?

It's still measured by wall clock time - not CPU time. I'd love to see them bill for actual CPU time.

You pay for more than cpu cycles. Yu are paying for those cycles to occur at a particular wall time and for some segment of memory to be reserved during that time as well.

Re: AWS Lambda pricing now per ms

#229
post #216

I think now is a good time to use this kind of services. https://callbackfy.com It's essentially a way to save some money by avoiding long http requests by buffering requests and sending a callback when the result is complete.

Using a service with a TLS certificate error... probably not.

The url is just a redirection to this:

https://rapidapi.com/kadukeitor/api/callbackfy2/

Re: AWS Lambda pricing now per ms

#230
post #206

Earlier quoted context omitted.

I’m not sure I’m interested in a hello world benchmark if it takes Python 5 seconds to import its dependencies in the real world.

In the real world you don't import 5 seconds worth of dependencies into a lamdba, and a 5 second boot time for a longer-lived service is acceptable.

> In the real world you don't import 5 seconds worth of dependencies into a lamdba

Laughs in data science.

> a 5 second boot time for a longer-lived service is acceptable.

Not every application can tolerate the occasional 5-second-long request. Just because Python can cold boot "hello world" 3 seconds faster than Go doesn't mean that's going to hold in the real world.

Post reply on HN