Live data from Hacker News

AWS Lambda and .zip is a recipe for serverless success

medium.com

1–10 of 117 posts

Re: AWS Lambda and .zip is a recipe for serverless success

#2
Serverless has its upsides but it also has downsides.

In an ideal, pure, world it’s awesome. The problem is that your lambda function usually needs to use some sort of external resources. (It is pretty useless if you don’t interact with anything)

Now you have to worry about and understand how to do access control on the said resources, how to collect the logs, how to collect metrics relevant to your code, how do you troubleshoot and deploy the function itself, how do you integrate it with the rest of things you have/own.

You’re just shifting complexity from an area to a another area.

It works great in some cases, but it’s far from beeing a panacea.

Re: AWS Lambda and .zip is a recipe for serverless success

#4
post #2

Serverless has its upsides but it also has downsides. In an ideal, pure, world it’s awesome. The problem is that your lambda function usually needs to use some sort of external resources. (It is pretty useless if you don’t interact with anything) Now you have to worry about and understand how to do access control on the said resources, how to collect the logs, how to collect metrics relevant to your code, how do you…

Right, and one of biggest downsides to serverless: reusing database connections/pools between requests. Right now the only "standard" solution offered by serverless's biggest advocates is pretty much a hack: rely on AWS's preservation of memory across some warm invocations. Basically keep it in a global variable and if you get lucky it'll still be there the next time your functions runs.

[1] http://blog.rowanudell.com/database-connections-in-lambda/

Re: AWS Lambda and .zip is a recipe for serverless success

#5
You know what would be better than a .zip? A .tar.gz file. Zip files cannot be unzipped without having the whole thing in memory. What's funny is that the Lambda environments (at least for Node) do not have the `zip` executable available which means that to zip/unzip something inside Lambda I need one written in javascript which has to be included in the zip file I upload to AWS instead of being able to use the native one.

Re: AWS Lambda and .zip is a recipe for serverless success

#6

I actually find zipping and uploading manually a PITA. Started using the Serverless framework [1] recently and now I just run `serverless deploy --stage dev --aws-profile profilename` from my repo (which is an npm script). [1] https://serverless.com/

No doubt! It seems antiquated and repetitive

Re: AWS Lambda and .zip is a recipe for serverless success

#7

I actually find zipping and uploading manually a PITA. Started using the Serverless framework [1] recently and now I just run `serverless deploy --stage dev --aws-profile profilename` from my repo (which is an npm script). [1] https://serverless.com/

It’s not quite as bad if you use .NET Core (which is what I’m currently using for a number of things in an integration stack). I just have to run “dotnet lambda deploy-function” with a template set up.

I started with Golang, however, and found the “out of the box” deployment process pretty painful which is part of why I switched to .NET Core.

Re: AWS Lambda and .zip is a recipe for serverless success

#8
post #6

I actually find zipping and uploading manually a PITA. Started using the Serverless framework [1] recently and now I just run `serverless deploy --stage dev --aws-profile profilename` from my repo (which is an npm script). [1] https://serverless.com/

No doubt! It seems antiquated and repetitive

Well that's what CI/CD is for. It's not any different than building and pushing a new docker image.

Re: AWS Lambda and .zip is a recipe for serverless success

#9
Cloud commoditized datacenters. People then tightly coupled their applications to cloud providers like AWS. After some time, containers came along and commoditized the cloud providers. Those applications no longer needed to be tightly coupled to a specific cloud provider. This reduced both costs and the risk of being invested in a single cloud provider.

Serverless (AWS Lambda) is just the cloud's way of trying to "de-commoditize" the containers that commoditized them. They want you to tightly couple your applications to their specific cloud provider again. And charge you more. How much is that function in the zip from S3 going to cost you to run in a container managed and run by AWS? And how long did you spend configuring the API Gateway (and where else can you apply what you've learned doing the configuration)? Next time you see an article fawning over serverless and saying things like "Containers just don’t matter in the serverless world" take a look at what the author does for a living. You'll start to see the same pattern I've been seeing.

Meanwhile, you could be spending less money and time treating AWS like a dumb processor with a network connection while only really configuring the open source software you already know. But it's your time and money.

Re: AWS Lambda and .zip is a recipe for serverless success

#10
post #6

I actually find zipping and uploading manually a PITA. Started using the Serverless framework [1] recently and now I just run `serverless deploy --stage dev --aws-profile profilename` from my repo (which is an npm script). [1] https://serverless.com/

No doubt! It seems antiquated and repetitive

It reminds me of WAR files with IBM websphere to be honest.
Post reply on HN