That is the real destination. With lambda serving GETs, we can remove the "for a single page app" from the title. AWS is so close to fulfilling the promise of its cloud: let developers worry about code.
AWS Lambda as a back end for a single-page app
41–50 of 77 posts
Re: AWS Lambda as a back end for a single-page app
#42The real question here is still: why doesn't Amazon offer a GET interface to Lambda? It's so, so, so close. So almost. They offer POST (through a work-around with S3), why not GET? That is the real destination. With lambda serving GETs, we can remove the "for a single page app" from the title. AWS is so close to fulfilling the promise of its cloud: let developers worry about code.
Re: AWS Lambda as a back end for a single-page app
#43The real question here is still: why doesn't Amazon offer a GET interface to Lambda? It's so, so, so close. So almost. They offer POST (through a work-around with S3), why not GET? That is the real destination. With lambda serving GETs, we can remove the "for a single page app" from the title. AWS is so close to fulfilling the promise of its cloud: let developers worry about code.
Re: AWS Lambda as a back end for a single-page app
#44Naive question: how does his example differ from a server responding to HTTP requests, that would take a JSON event as an argument and return a json version of: "the value was: "+ event['key1'] I suppose the AWS wins in term of set up and easiness of deployment. Anything else?
It differs in that you don't have to worry about scaling up that HTTP server, or pay for the machine hosting that HTTP server. With Lambda, you only pay per requests, current rate is $0.20 per 1 million requests.
Re: AWS Lambda as a back end for a single-page app
#45Earlier quoted context omitted.
It differs in that you don't have to worry about scaling up that HTTP server, or pay for the machine hosting that HTTP server. With Lambda, you only pay per requests, current rate is $0.20 per 1 million requests.
Is there also any limit on machine resources that a single request can use? I'm curious about cases in which requests might need non-trivial amount of computational power.
Re: AWS Lambda as a back end for a single-page app
#46How is this different from what Azure Mobile Services and many others have been offering for the past 2 years? To me it seems the author is proclaiming Platform As A Service is entirely new (look, no spinning up AWS instances!) while this has been around for quite some time, just Amazon is getting into it more seriously recently.
Re: AWS Lambda as a back end for a single-page app
#47"the future is now, and it's down because somebody used the secret key to drain the poster's bank account" To be sure, the author specifies that the IAM role being exposed here is only allowed to invoke the function. That's great for the security of the other resources on the account, but still allows a reasonably determined attacker to run up a Bill of Unusual Size quite rapidly. For instance, the rate limiter curre…
You could even route a billing alerts (via SNS) back to a Lambda function, use it to set a flag, and run in a reduced capacity mode if this is a concern.
I always tell my audiences (I work for Amazon) that it should be possible to build a system where you know the actual cost of every web page you generate and every request you serve, and to make sure that each one has the ability to earn its keep (by ultimately driving revenue).
Re: AWS Lambda as a back end for a single-page app
#48Earlier quoted context omitted.
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
#49How 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: pricing -- good question I'm going going to test that. Re: gigabyte seconds: It's how much memory (RAM) you're using: 128mb RAM (lowest possible value) for 10s == 1 GB/s 1gb RAM for 1s == 1 GB/s I think it's a pretty clever way to (somewhat) directly correlate compute cost with power (energy). If you remember what John McCarthy said when he imagined that computing would be a public utility one day ( http://www.te…
Re: AWS Lambda as a back end for a single-page app
#50Earlier quoted context omitted.
Re: pricing -- good question I'm going going to test that. Re: gigabyte seconds: It's how much memory (RAM) you're using: 128mb RAM (lowest possible value) for 10s == 1 GB/s 1gb RAM for 1s == 1 GB/s I think it's a pretty clever way to (somewhat) directly correlate compute cost with power (energy). If you remember what John McCarthy said when he imagined that computing would be a public utility one day ( http://www.te…
Doesn't this terminology come from power utilities where a kilowatt hour is kW.h. as in kilowatt × hour. Not kilowatt / hour. So why is a GB second, a GB / second and not GB × second?