Live data from Hacker News

AWS Lambda pricing now per ms

aws.amazon.com

61–70 of 291 posts

Re: AWS Lambda pricing now per ms

#61

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.

> So this is a pretty good advancement for cost savings. For some people. Those cost savings are made up somewhere else. Ultimately, Amazon is not a loss leader.

If Amazon reduces costs behind the scenes, they can maintain the same revenue while lowering prices for everyone, by helping people deploy previously cost-prohibitive infrastructure.

(ie, if people now use 1.5x as many Lambdas, they can lower costs by 1/3, and everyone wins).

Re: AWS Lambda pricing now per ms

#62
post #3

Anyone know why there's a hard limit of 15 minutes for Lambda (and 9 minutes for Google Cloud Functions)? Still seems really weird to me.

It's a new pattern, so it's only relevant for some use cases. I don't think it's meant to solve every cases: including the case of a long running job.

It's best suited for jobs that can be broken down into tons of small individual computations, or to respond directly to HTTP requests. If you can fit your pipeline / application into that model it's usually beneficial: Instant scaling, retries, reliable etc. Mixed with other concepts like SQS you can build pretty powerful things without having to pay when there's no load.

Re: AWS Lambda pricing now per ms

#63

Earlier quoted context omitted.

It's nice to see that AWS is using their economy of scale to reduce their own costs, and passing that on to the consumer.

I don't think they are doing it to be nice to consumers. I think they are doing it to cost less than competitors.

FWIW I was informed by an AWS employee that their internal philosophy is to keep pricing at cost+ levels, which is a strategic play - it forces the operations to remain lean and discourages many competitors from trying to wedge themselves into the cost-price gap.

Fat profit margins attract competition, this is what happened when Oracle/Unix combo were chewed up by Microsoft Windows/SQL from the bottom, and then Linux/MySQL started chewing up Microsoft from their bottom. It's the dog-eats-dog world.

Re: AWS Lambda pricing now per ms

#64

Earlier quoted context omitted.

It's nice to see that AWS is using their economy of scale to reduce their own costs, and passing that on to the consumer.

I don't think they are doing it to be nice to consumers. I think they are doing it to cost less than competitors.

I think everyone is already aware of the fact that AWS is a company.

Re: AWS Lambda pricing now per ms

#65
post #40

Earlier quoted context omitted.

Lambda isn't designed for long running processes. Keeping the runtime limit lower makes it a lot easier to operate the underlying metal because you can move thing around every N minutes where N is the runtime limit. For long-running processes, something like Fargate might be a better fit in the AWS side of things.

Fargate works well especially after they fixed some of the pricing issues there. Then next step you can spin up a fleet of EC2 or EKS or something

Yup! In general, I prefer Fargate over Lambda because of cold starts. It's a little bit more management overhead over Lambda and it is a bit lower level. But I think it's worth it.

Re: AWS Lambda pricing now per ms

#66
post #49
post #3

Anyone know why there's a hard limit of 15 minutes for Lambda (and 9 minutes for Google Cloud Functions)? Still seems really weird to me.

How long would you like it to be? Chris Munns - Lead of Dev Advocacy for Serverless@AWS

My lambdas run indefinitely. It's a bit silly, but basically every lambda spins up a bunch of threads, pulls messages, and then pushes them into internal buffers to be processed. There are reasons for this.

What I care about is: * Scale to 0, and automatic scaling up without configuring it

* Automatic patching of the OS

* Fault isolation

Lambda gives me that. So each one runs for 15 minutes, processing all data in an SQS queue.

I do wonder if Fargate would be cheaper per millisecond? Dunno.

Re: AWS Lambda pricing now per ms

#67
post #32

Earlier quoted context omitted.

I don't think they are doing it to be nice to consumers. I think they are doing it to cost less than competitors.

Isn't that the same in practice? You get customers by being nice to them. Being nice to customers means competitive pricing, high quality support, good documentation, easy integration, etc. It's all driving towards the same goal.

Naming good documentation and high quality support in conjunction with AWS is a bit weird to me. Though parent was talking about using their scale to improve prices. They might just reduce their margins at the moment.

Re: AWS Lambda pricing now per ms

#68

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

And it costs even more if you need that Lambda function to have access to the internet.

A possibly useful comparison:

A Raspberry Pi 3 (~6.5 watts) costs $6.83 per year to run full-time (at 12 cents per kWh). You get a full computer with much more I/O.

However, there are a lot of other factors to consider:

- Initial cost of the hardware

- Time and energy spent maintaining/configuring the device

- Physical maintenance of the device - power/network/physical management/etc

- Lack of immediate access to I/O ramp-up and global replication

- Lack of direct integration into other AWS services/etc

AWS Lambda isn't a magic bullet, but it offers a lot of convenience to offset time and money spent on a DIY approach. I run a small static site/service that never breaks Lambda's free tier, but most of the cost goes to hosting a NAT gateway for it to have access to the internet. The benefit of hassle free, global access to the service I built and the underling services it runs on (Lambda/AWS in general) makes it worth the cost. I could setup the same service at home on a Raspi for pennies by comparison, but if my home internet goes down while I'm away, or a dog chews on an ethernet cable, it's a headache that I have to deal with personally - or I have to do remote tech-support to whoever is home: "Okay, you should see a Raspbery Pi. No...it's not a food. It's a computer. Whatever... I know it's a strange name. Anyway, is the cable plugged in? Do you see a blinking light?"

I find it similar to being able to use a rental car while visiting a foreign city vs just driving yours across the country to save some money. You might save some money, but it comes with extra time, maintenance, potential roadblocks (literally and figuratively), breakdowns that you will have to deal with personally, etc. It's really up to personal preference.

Re: AWS Lambda pricing now per ms

#69
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.

Lambda has a 15 minute limit, I'm not sure exactly how it compares to ec2 but for a low duty cycle application it still makes sense! It is also pretty easy to combine a lambda to SNS or SQS

Re: AWS Lambda pricing now per ms

#70
post #5

I've learned that AWS pricing tends to improve over time, and I appreciate it. I just recently switched from a startup offering authorization to AWS Cognito because the startup kept raising their price(s). It's nice to see this drop, though I'm sure Amazon does it due to competition as well.

I just recently switched from a startup offering authorization to AWS Cognito because the startup kept raising their price(s).

Maybe because they know Cognito is horrible? ;)

OTOH, I have never seen DynamoDB prices decreasing.

Post reply on HN