News for hackers. Stuff that matters.
Re:Apex lets you build, deploy, and manage AWS Lambda functi... by pmontra on Friday May 20, 2016 @06:05AM (#11736680)
But there are already tools like

https://github.com/Miserlou/django-zappa

https://aws.amazon.com/blogs/compute/building-enterprise-lev...

plus something else that was featured on HN recently and I can't find or remember.

Amazon itself has a tutorial about the integration of the API gateway with Lambda at http://docs.aws.amazon.com/apigateway/latest/developerguide/...

I saw an evangelist demoing it at an Amazon Summit a month ago. It's so time consuming and error prone that you don't want to do it manually more than once (not that he made any mistake).

So I won't say it's a corner case. Maybe it's too early to know what Lambda will grow into.

Re:Apex lets you build, deploy, and manage AWS Lambda functi... by homero on Friday May 20, 2016 @10:42AM (#11738151)
What's the point of API Gateway? Looks like a proxy where you recreate your api and does nothing more.
Re:Apex lets you build, deploy, and manage AWS Lambda functi... by beat on Friday May 20, 2016 @02:06PM (#11740078)
API Gateway does a number of things. It distributes endpoints via cloudfront, which is pretty awesome. It serves as a unified front end for a collection of back end microservices. It handles client cert authentication (important to us, but not to most people) and api keys for you, and a bunch of other neat stuff as well. And it offers a test harness where you can mock up data easily.

In theory, you could do the same thing with nginx and load balancers and multiple ec2 instances, but it'd be a lot more work. And I think the real magic is with integration with Lambda. That's a game-changer.

Re:Apex lets you build, deploy, and manage AWS Lambda functi... by homero on Saturday May 21, 2016 @02:45AM (#11743506)
Offloading some calls into lambda does look cool
Re:Apex lets you build, deploy, and manage AWS Lambda functi... by pmontra on Friday May 20, 2016 @11:33AM (#11738644)
I think I leant about it when I learnt about Lambda. In this context it's a convenient way to give a URL to a function, pass parameters to it and get back the result. You could build HN with the API gw, one Lambda function per each request and a db.
Re:Apex lets you build, deploy, and manage AWS Lambda functi... by inopinatus on Friday May 20, 2016 @06:05PM (#11741892)
That's exactly what I'm suggesting is an anti-pattern. Yes you can do that. Yes it's hardly surprising that AWS make it possible, since synchronous RESTful CRUD is such a popular integration approach and often the first one we learn.

But I'd advise you to design your LambdaNews service using an asynchronous event-driven model instead. You'll find it reduces complexity and makes for a snappier, more reliable client experience (e.g. no 429 throttling responses to handle). You'll also find that the supporting AWS services like Kinesis, Cognito, IoT, SNS, SQS, DynamoDB, S3 etc are much more in tune with that pattern.

The fact is that async platforms scale much better than anything that has to block and poll. It should hardly be surprising that at AWS's massive scale, it becomes a preferred service design pattern.

Pub/sub integration people have known this for decades, it is not news.

obdisclosure: I am ex-AWS but all the above is derived from public statements and documentation.

Re:Apex lets you build, deploy, and manage AWS Lambda functi... by pmontra on Saturday May 21, 2016 @12:10PM (#11745147)
I'm sincerely interested. The POST I use to submit this comment can be asynchronous, no problem (just do ajax). Same for votes and flags. The GET I use to get the page could be a real HTTP GET or diffs coming over a websocket (but I need a page to start with). I'm not sure how to implement that in the AWS ecosystem because I don't have much experience on it, but is it this what you mean with "asynchronous event-driven model"?