Live data from Hacker News

AWS Lambda pricing now per ms

aws.amazon.com

51–60 of 291 posts

Re: AWS Lambda pricing now per ms

#51

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?

You are billed by the execution time of the function. So from the millisecond we hand the event over to you until you return a response or timeout.

- Chris - Serverless@AWS

Re: AWS Lambda pricing now per ms

#52

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.

Just out of curiosity, what are you getting out of your 160 million CPU cycles? Are you mostly on the CPU, or mostly waiting for something (database call or whatever)?

Re: AWS Lambda pricing now per ms

#53
post #36

Earlier quoted context omitted.

On the one hand I read that JS Lambdas were often already under 100ms (30-50ms) On the other hand I heard legends about under 10ms Rust Lambdas.

That's the point- billed per ms, a Lambda that executes in 5ms is 10x cheaper than one that takes 50ms. Billed per 100ms interval, the total cost of the two is the same.

Yes,

I'm not questioning that 5 is a tenth of 50. I'm questioning the Rust speed :D

Re: AWS Lambda pricing now per ms

#54
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…

I'm not sure about lambda, but cloudflare workers use v8 isolates to avoid starting a new process at all.

Re: AWS Lambda pricing now per ms

#55

I am curious to see if this will mean a shift to more efficient languages (Go or Rust) for Lambda services, as usually people default to JS

A lot of this was based around the fact that we've seen languages become just so much more performant. This includes Go/Rust/etc, but a lot of Node.js workloads are also sub 100ms, or fast enough that they'd benefit from this pretty well.

- Chris, Serverless@AWS

Re: AWS Lambda pricing now per ms

#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

Re: AWS Lambda pricing now per ms

#58
post #37

66$ for running a AWS Lambda with 128 for a year seems very expensive.

If you're running it continuously for a year, then you should probably be using a reserved instance and not lambda. Lambda is for short bursts, not 1 year of continuous use.

Not necessarily, especially in a large company setting. Lambda allows you to scale and take care of spikey traffic. It also doesn't require server management. Servers are a pain in the butt.

Re: AWS Lambda pricing now per ms

#59
post #6

Necessary change. Now writing stuff in fast languages suddenly matter in cost, changing the landscape of when these solutions might become viable for a chase.

And you can pick any language you'd like as it supports arbitrary containers now too: https://news.ycombinator.com/item?id=25267182

Re: AWS Lambda pricing now per ms

#60
post #17

Earlier quoted context omitted.

If it takes 60 seconds, that's 600 steps. 601 steps isn't that much of a saving. It matters close to 0.

If a process takes that long, lambda would be a poor architectural choice.

My lambdas run for 15 minutes. I feel that they're still a great choice :)
Post reply on HN