
AWS Lambda Makes Serverless Applications a Reality - panabee
http://techcrunch.com/2015/11/24/aws-lamda-makes-serverless-applications-a-reality/?ncid=rss#.iqrhs1:mzPV
======
posabsolute
It's funny we tested lambda + Amazon gateway api this week at work.

It's awesome!.. Until you have to deal with the cold start issue. Our first
call takes about 1.5 seconds; and then all other calls take about 50-80ms.

Your container stays in cache about 5-10 minutes unless it is called back,
there are no guarantees.

This micro service is not called often and for us 1.5 seconds is never
acceptable.

~~~
toomuchtodo
You could use a scheduled cron task in Lambda to make requests to keep your
API hot.

~~~
posabsolute
Yeah we thought about that, but is it reliable? We were really not sure we
could always get rid of the cold start issue.

~~~
twagner
AWS Lambda function schedules are driven off the same fault-tolerant, highly
available service that powers SWF. (So...yes, they're reliable :)

~~~
anonymoushn
Is keeping it hot with a cron job reliable though?

------
priz3
Take a look at the JAWS stack which makes heavy use of Lambdas:

[https://github.com/jaws-framework/JAWS](https://github.com/jaws-
framework/JAWS)

Previous JAWS HN post ~4 months ago:

[https://news.ycombinator.com/item?id=10005415](https://news.ycombinator.com/item?id=10005415)

------
zbjornson
Has anyone using Lambda gotten Amazon to substantially increase the limits on
concurrent jobs? We asked for 10k and they gave us 1k. The article posted in
this thread and other sites use words like "limitless" and "massive," but 1k
concurrent requests is ... tiny. We're hesitant to keep building around this
architecture because of the limit.

------
epoch1970
How does one version control the scripts and easily deploy them? How does one
test them on one's own computer when developing them? Must the scripts be
uploaded into AWS after every change if testing is to be done?

~~~
alexbilbie
It's very easy to test scripts locally - here's my quick and dirty SNS->lambda
tester script -
[https://gist.github.com/alexbilbie/cd1a1309bd7267d860b0](https://gist.github.com/alexbilbie/cd1a1309bd7267d860b0)

Deployment is easy too; I've got a two line bash script that zips the code
then uploads it using the AWS CLI.

Versioning documentation can be found here -
[http://docs.aws.amazon.com/lambda/latest/dg/versioning-
alias...](http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html)

------
tangentspace
I just stumbled onto this Lambda example project today, looks pretty
interesting:
[https://github.com/awslabs/simplebeerservice](https://github.com/awslabs/simplebeerservice)

------
yeukhon
If Lambda is able to expand the /tmp disk space from 500MB to a few GB I think
that will further make the adopter better on my end. I have a requirement in
which Lambda is a perfect solution except the disk space is not enough. Of
course I can further divide the work into smaller chunks. If you have use
distributed task library like Celery, just think of that no longer tie to your
application, and you can run on event based (S3, SNS, email notification via
SNS). It's quite awesome. You can probably build a public API using Lambda and
API Gateway.

However, once you start using Lambda, like distributed system, testing becomes
a challenge if you are used to testing everything you own in one or two
monolithic codebase. I wish someone could come up with a mock version of AWS
:-)

~~~
twagner
Appreciate the feedback/suggestions! We'll take a look at expanding the disk
space, probably as part of the "power level" adjustment that already affects
memory, CPU power, etc.

~~~
RA_Fisher
One minor feature request would be to allow Scheduled Events every minute. My
current solution is EC2 -> S3 file every minute, but it's a kludge.

~~~
yeukhon
There is : [http://www.slideshare.net/AmazonWebServices/cmp407-lambda-
as...](http://www.slideshare.net/AmazonWebServices/cmp407-lambda-as-cron-
scheduling-invocations-in-aws-lambda) but I kinda dislike the whole
complexity). This is a new feature.

------
exratione
My contribution to the Lambda application construction party:

[https://github.com/exratione/lambda-
complex](https://github.com/exratione/lambda-complex)

Lambda Complex is a Node.js framework for applications that run entirely
within Lambda, SQS, and other high abstraction layer AWS services. It is well
suited to non-realtime content generation and other types of application
driven by message queues and which require enforced concurrency limits.
Examples include high volume generation of static content from data or other
types of workflow initiated in response to messages placed into SQS queues.

------
sinatra
We're considering using API Gateway and Lambda for our upcoming API service.
Would love to hear feedback from anyone who's tried it. From the linked
article, I got one gist [1] which wasn't very favorable for the API Gateway +
Lambda setup.

[1]
[https://gist.githubusercontent.com/mpdehaan/d979252b9c69cfd1...](https://gist.githubusercontent.com/mpdehaan/d979252b9c69cfd1f6ef/raw/9186cb3e0652e592801c58b7440c9fb819e8d240/Arbitrary%2520thoughts%2520on%2520AWS%2520Lambda%2520+%2520API%2520Gateway)

~~~
teej
I'm so glad you asked this! I _just_ built a service on API Gateway + Lambda
in the past two weeks. Here's my unstructured thoughts -

* I love that I don't have to provision any resources. The fact it will scale to volume automatically is a huge win.

* Lambda was a treat to work with. We used it with Python. Both the web console and API interface worked great for us.

* I was able to get Lambda development working end-to-end with a Makefile and the AWS CLI.

* API Gateway was a bear to work with. The concepts are unintuitive, the interface sucks, and the logging is lackluster. I found it difficult to go through the develop/test/deploy cycle on because of these issues.

* API Gateway is brand new. Brand new AWS services have bugs. We hit bugs.

* API Gateway documentation is awful.

* API Gateway had a bug where it stopped logging. If it doesn't log, it is literally impossible to debug. This hard-stopped development for 5 days while they worked on a fix.

* There's an invisible error case where your API doesn't have permissions to invoke the Lambda command. It's easy to hit and annoying.

* API Gateway doesn't support POST requests in the way you would expect. This leads to over-complicated setups for simple use cases.

* I really don't prefer the way mapping templates work in API Gateway.

Overall, our setup is humming along nicely, but it's just 2 routes. I just
reviewed the Gist and I agree with many of the concerns expressed in it.

~~~
jeffbarr
Have you reported any of your issues with the API Gateway to us? Please feel
free to send them to me via the contact address in my HN profile and I will
share them with the team ASAP!

~~~
teej
I went through official support channels with my blocking issues. They have
since been resolved.

------
mikkom
Serverless = using someone elses servers?

~~~
eistrati
I like this explanation: [https://www.quora.com/What-is-Serverless-
Computing](https://www.quora.com/What-is-Serverless-Computing)

Quote - Serverless doesn’t mean servers are no longer involved. It simply
means that developers no longer have to think "that much" about them.
Computing resources get used as services without having to manage around
physical capacities or limits.

~~~
lqdc13
I actually think people end up thinking more about it.

Sometimes you have several "devops" people in a small team dealing with
orchestrating these "serverless" deployments so as to reduce latency etc.

------
dozy
Been having fun playing with Lambda to power various Amazon Echo skills[1].
Definitely easier than having to deploy with something like Elastic Beanstalk,
or even App Engine.

We're also using this at mParticle Inc. to allow anybody to add themselves as
an integration[2]. The point being that Lambda is a super-easy way to write
_some_ server logic, even if it only serves as a proxy to something more
complex.

[1] [https://developer.amazon.com/public/solutions/alexa/alexa-
sk...](https://developer.amazon.com/public/solutions/alexa/alexa-skills-
kit/docs/developing-an-alexa-skill-as-a-lambda-function)

[2] [https://github.com/mParticle/mparticle-sdk-
java](https://github.com/mParticle/mparticle-sdk-java)

------
cdnsteve
I just ended up using Heroku for an API instead. I was able to use the latest
language version and microframework of my choice and still not worry about
servers. Setup was way more intuitive than AWS. Testing locally was a known
thing and easy. I found wrapping my head around testing API gateway to lambda
to aws services a mess. Also all the IAM rules got confusing. I'll probably
have another look after it has matured.

I've never used Heroku before and got a production ready API out the door in
no time.

~~~
nickspacek
Heroku is more like Elastic Beanstalk than Amazon API Gateway. API Gateway is
more of a Backend As A Service as I understand it, like Parse.

~~~
andrewmunsell
API Gateway doesn't really encompass Parse's scope, either. It's more of a
router-as-a-service that allows you to forward HTTP requests to other AWS
services, Lambdas, or your custom backend (+ do some stuff with IAM and auth,
etc)

------
rahimnathwani
Related submission about unikernels from a few days ago:
[https://news.ycombinator.com/item?id=10603915](https://news.ycombinator.com/item?id=10603915)

------
kayman
Sounds like an AD for AWS. I wonder which clueless CIO will gobble this up.

