Live data from Hacker News

AWS Lambda as a back end for a single-page app

lg.io

21–30 of 77 posts

Re: AWS Lambda as a back end for a single-page app

#21
post #17

So the backend becomes a repository of small lambda-modules.. on a testing perspective, that's pretty cool. I agree that it could be the next big thing as new libraries leverage that. Basically, there's no more "Platform as a service".. there is just "your code" that gets executed whenever. You can upload a new module without touching the other modules. Something worth exploring in my next hackathon : )

It's really just a more fine-grained PaaS, not significantly different than a bunch of tiny Heroku apps (the ~1 second cold start time is significantly better than Heroku's though)

Re: AWS Lambda as a back end for a single-page app

#22
post #17

So the backend becomes a repository of small lambda-modules.. on a testing perspective, that's pretty cool. I agree that it could be the next big thing as new libraries leverage that. Basically, there's no more "Platform as a service".. there is just "your code" that gets executed whenever. You can upload a new module without touching the other modules. Something worth exploring in my next hackathon : )

If the environment the lambda-modules run in isn't PaaS, how would you categorize it?

Re: AWS Lambda as a back end for a single-page app

#24

I don't think I'd trust building directly on it for the 100 req/sec limit and whatever latency it introduces, but it seems like it would complement heroku dynos really nicely farming out processor-intensive stuff like bcrypt.

I think it is 100 concurrent requests per account. That is pretty low IMO. I think it was intended for things that are CPU intensive and short-lived. If it needs to pull from a data store and process, it likely isn't a good idea for lambda to begin with, right?

I agree, it is only really useful to use like this for certain scenarios.

Re: AWS Lambda as a back end for a single-page app

#25
post #9

How hard is it to pull in extra dependencies for the script ?

There are a few answers in the FAQ around this: (none specifically answering the "easy" part): http://aws.amazon.com/lambda/faqs/

My own experiences of working with Amazon services suggest that this will probably be great for some use-cases and very complex and unpleasant for others, and will probably be updated every six or twelve months in a fairly drastic way which will make it hard to find helpful documentation. Maybe I'm just feeling cynical today, though.

Re: AWS Lambda as a back end for a single-page app

#26
post #24

I don't think I'd trust building directly on it for the 100 req/sec limit and whatever latency it introduces, but it seems like it would complement heroku dynos really nicely farming out processor-intensive stuff like bcrypt.

I think it is 100 concurrent requests per account. That is pretty low IMO. I think it was intended for things that are CPU intensive and short-lived. If it needs to pull from a data store and process, it likely isn't a good idea for lambda to begin with, right? I agree, it is only really useful to use like this for certain scenarios.

All of those limits are typically to protect users from being over charged if they fat-finger something. Most limits like that can be lifted with a support ticket. I'm not sure if this is one of them but I think it's likely.

Re: AWS Lambda as a back end for a single-page app

#27
post #19

I like the idea of Lambda. I have some linux binaries that I would like to run on demand. I wonder if this is possible.

You should be able to do that as described here : https://aws.amazon.com/blogs/compute/running-executables-in-... Note that there are some limits regarding the size of the zip you upload [1]. 1: http://docs.aws.amazon.com/lambda/latest/dg/limits.html

Thanks for the links! If my executable relies on .so files in a lib directory, is it possible to set env variables to point to a local path?

Re: AWS Lambda as a back end for a single-page app

#28
post #4

What's the typical latency for a request when you use lambda, such as for this example?

p99.9 was 100ms for me. p50 was 10ms.

Did 100k requests. Did these tests back in November during the preview. I imagine it has different latency now so those numbers are probably close to useless.

Re: AWS Lambda as a back end for a single-page app

#29
How does the pricing compare with say X amount of tasks that run for 1 second each compared to what you could expect from 1 hour on a medium ec2 instance?

EDIT: I see it offers "The Lambda free tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month. " What is a GB-second ;)

Re: AWS Lambda as a back end for a single-page app

#30
post #9

How hard is it to pull in extra dependencies for the script ?

There are a few answers in the FAQ around this: (none specifically answering the "easy" part): http://aws.amazon.com/lambda/faqs/ My own experiences of working with Amazon services suggest that this will probably be great for some use-cases and very complex and unpleasant for others, and will probably be updated every six or twelve months in a fairly drastic way which will make it hard to find helpful documentation.…

I think AWS is betting big on Lambda (I work there). So I think you'll see a lot of continued innovation around the service. They're pretty intense about consuming customer feedback and iterating on it so if you have an idea or desire that you would like Lambda to incorporate I'd definitely shoot them an email/ticket -- it's not a black hole.
Post reply on HN