TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

229 点作者 arange大约 10 年前

21 条评论

d0m大约 10 年前
So the backend becomes a repository of small lambda-modules.. on a testing perspective, that&#x27;s pretty cool. I agree that it could be the next big thing as new libraries leverage that.<p>Basically, there&#x27;s no more &quot;Platform as a service&quot;.. there is just &quot;your code&quot; that gets executed whenever. You can upload a new module without touching the other modules.<p>Something worth exploring in my next hackathon : )
评论 #9557621 未加载
评论 #9557636 未加载
Zaheer大约 10 年前
I&#x27;ve used <a href="http:&#x2F;&#x2F;www.Webscript.io" rel="nofollow">http:&#x2F;&#x2F;www.Webscript.io</a> in the past which is essentially just like AWS Lamda to make static sites &#x27;dynamic&#x27; with no backend.
nothrabannosir大约 10 年前
The real question here is still: why doesn&#x27;t Amazon offer a GET interface to Lambda? It&#x27;s so, so, so close. So almost. They offer POST (through a work-around with S3), why not GET?<p>That is the real destination. With lambda serving GETs, we can remove the &quot;for a single page app&quot; from the title. AWS is so close to fulfilling the promise of its cloud: let developers worry about code.
评论 #9558083 未加载
评论 #9558091 未加载
评论 #9558238 未加载
xur17大约 10 年前
What&#x27;s the typical latency for a request when you use lambda, such as for this example?
评论 #9557542 未加载
评论 #9557687 未加载
评论 #9557540 未加载
S4M大约 10 年前
Naive question: how does his example differ from a server responding to HTTP requests, that would take a JSON <i>event</i> as an argument and return a json version of:<p><pre><code> &quot;the value was: &quot;+ event[&#x27;key1&#x27;] </code></pre> I suppose the AWS wins in term of set up and easiness of deployment. Anything else?
评论 #9557988 未加载
benologist大约 10 年前
I don&#x27;t think I&#x27;d trust building directly on it for the 100 req&#x2F;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.
评论 #9557644 未加载
评论 #9557595 未加载
crdoconnor大约 10 年前
Does nobody else look at this and worry about the vendor lock in implications?<p>If your app is dependent upon a technology like this, it&#x27;s much harder to move to a different platform than if just used, say, EC2.
评论 #9559108 未加载
评论 #9559289 未加载
jelz大约 10 年前
Some time ago, when Lambda was in its early preview, I&#x27;ve created awsletter [1], a newsletter system w&#x2F;o any old-style backend components - only AWS SDK for browser, S3 and Lambda. Pretty the same idea - utilize &quot;invoke function&quot; calls to realize backend actions.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;jelz&#x2F;awsletter&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jelz&#x2F;awsletter&#x2F;</a>
codewithcheese大约 10 年前
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?<p>EDIT: I see it offers &quot;The Lambda free tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month. &quot; What is a GB-second ;)
评论 #9557706 未加载
teddyknox大约 10 年前
This makes me think that Amazon should build a service that acts as a virtualized &quot;pre-fork worker model&quot; server (a la [g]unicorn) and transparently scales WSGI&#x2F;Rack&#x2F;etc application processes across machines.
zimbatm大约 10 年前
How hard is it to pull in extra dependencies for the script ?
评论 #9557660 未加载
评论 #9557640 未加载
akhatri_aus大约 10 年前
AWS has a couple of issues with Lambda. If you use a binary its very difficult to talk to the process. No port binding means its nearly impossible to talk to processes without prohibitive changes (named pipes are a solution but it requires extensive code changes to existing apps)
iceburg大约 10 年前
It is certainly an amazing product. Would be interesting to know how Amazon designed it, specially for security. Does anyone know if they just put all requests in a queue and spin up containerized environments for each request?
tsxxst大约 10 年前
Is it possible to have the same thing but over websockets? As Lambda can also listen to DynamoDB, it would be quite interestig to have an ability to forward this kind of events to browser clients.
JDDunn9大约 10 年前
How would this use differ from Amazon&#x27;s elastic beanstalk?
评论 #9558743 未加载
codewithcheese大约 10 年前
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.
评论 #9557601 未加载
评论 #9557600 未加载
Maarten88大约 10 年前
&gt; The future is now, and it&#x27;s using AWS Lambda<p>How 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.
评论 #9558452 未加载
mardurhack大约 10 年前
Can this be called RPC? If not, what is the difference? Amaz(on)ing service anyway!
al2o3cr大约 10 年前
&quot;the future is now, and it&#x27;s down because somebody used the secret key to drain the poster&#x27;s bank account&quot;<p>To be sure, the author specifies that the IAM role being exposed here is only allowed to invoke the function. That&#x27;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.<p>For instance, the rate limiter currently kicks in at 1000TPS. Assuming the smallest memory size (128MB) and requests &lt;100ms, that&#x27;s a worst-case spend of roughly $18&#x2F;day per Lambda function. Not the wallet-melting consequences of, say, accidentally posting AWS root credentials but not great either. Multiply that by the number of endpoints you&#x27;d likely want in a single-page app, and it gets expensive.
评论 #9558055 未加载
评论 #9558173 未加载
wnevets大约 10 年前
I like lambda a lot. I just have to find more use cases for it.
jameshush大约 10 年前
Hey, just a heads up, you posted your AWS secret key. I&#x27;d take that down and change your key ASAP. I had my keys compromised before and someone racked up a $5k AWS bill mining bit coins.
评论 #9557458 未加载
评论 #9557432 未加载