Live data from Hacker News

Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

aws.amazon.com

31–40 of 140 posts

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#31

Wherein "serverless" basically means more computers in more places just doing different tasks.

Some people prefer to call it Function as a Service, which in most cases is closer to what it actually is.

"serverless" does not refer to the absolute lack of servers - it refers to the fact that your CODE (applications and software in general) should not be AWARE of being executed on a physical or virtual machine.

The platform should be as abstract as it gets. I always imagine it as coding on a piece of paper: in a way, my code should work and make "sense", even though we all know that a piece of paper won't execute any instructions. And this is part of the magic of "serverless" software: it imagines a perfect, abstract machine where it can run, forgetting about the complex, unreliable, physical machine underneath.

It's an almost philosophical approach to writing software and getting it needs some time and thought. And needless to say, it does not solve ALL your problems, but it MIGHT solve SOME of your problems.

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#32
post #30
post #16

I've recently deployed a small Flask based micro-service for an internal tool leveraging Zappa[0] to deploy it to Lambda/API Gateway. Overall it's been a really smooth experience. I'm looking forward to using it again. [0] https://github.com/Miserlou/Zappa

Is there a big overhead in terms of latency? If I understand correctly you essentially have to start a server for each request.

~20ms, and there is no parallel burden, so it's usually faster in medium to high traffic scenarios.

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#33
post #16

I've recently deployed a small Flask based micro-service for an internal tool leveraging Zappa[0] to deploy it to Lambda/API Gateway. Overall it's been a really smooth experience. I'm looking forward to using it again. [0] https://github.com/Miserlou/Zappa

Zappa author here - thank you for your support!

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#34
post #19
post #4

Earlier quoted context omitted.

I think acloud.guru is served through lambda. I think if you go the single page app route with S3 + cloudfront CDN + API gateway + lambda (so many words/things) you can deliver a really high quality product. You can also cache responses out via elasticache. It's not perfect but the development velocity and potential is really exciting.

The site itself is powered by Netlify.

I was going off of this article: https://read.acloud.guru/serverless-the-future-of-software-a...

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#35
post #31

Wherein "serverless" basically means more computers in more places just doing different tasks.

Some people prefer to call it Function as a Service, which in most cases is closer to what it actually is. "serverless" does not refer to the absolute lack of servers - it refers to the fact that your CODE (applications and software in general) should not be AWARE of being executed on a physical or virtual machine. The platform should be as abstract as it gets. I always imagine it as coding on a piece of paper: in a…

> it refers to the fact that your CODE (applications and software in general) should not be AWARE of being executed on a physical or virtual machine.

With the exception of para-virtualised device drivers, what code is ever aware of being executed on physical or virtual machines?

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#36
post #31

Wherein "serverless" basically means more computers in more places just doing different tasks.

Some people prefer to call it Function as a Service, which in most cases is closer to what it actually is. "serverless" does not refer to the absolute lack of servers - it refers to the fact that your CODE (applications and software in general) should not be AWARE of being executed on a physical or virtual machine. The platform should be as abstract as it gets. I always imagine it as coding on a piece of paper: in a…

I don't think it has to do with the way the application is written at all. It's how it's deployed and managed.

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#39
post #16

I've recently deployed a small Flask based micro-service for an internal tool leveraging Zappa[0] to deploy it to Lambda/API Gateway. Overall it's been a really smooth experience. I'm looking forward to using it again. [0] https://github.com/Miserlou/Zappa

I love zappa, there's also chalice: https://github.com/awslabs/chalice

Re: Going Serverless: Migrating an Express App to AWS API Gateway and AWS Lambda

#40
post #30
post #16

I've recently deployed a small Flask based micro-service for an internal tool leveraging Zappa[0] to deploy it to Lambda/API Gateway. Overall it's been a really smooth experience. I'm looking forward to using it again. [0] https://github.com/Miserlou/Zappa

Is there a big overhead in terms of latency? If I understand correctly you essentially have to start a server for each request.

Not the case - it runs with all dependencies cached if its called multiple times. Inconsistent calls will incur the delay though.
Post reply on HN