News for hackers. Stuff that matters.
Re:AWS Lambda and .zip is a recipe for serverless success by fapjacks on Sunday March 18, 2018 @12:20PM (#16612658)
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 by djhworld on Sunday March 18, 2018 @01:50PM (#16613177)
AWS Lambda itself isn't vendor lock in.

If you write your Lambda function to put the interaction between the AWS Lambda service at the surface level of your application (i.e. the entry/exit point), and then write your business logic inbetween, you can create a function that is quite easily tranferrable between cloud providers.

The vendor lock in creeps in more around the surrounding services that the cloud provider offers. You can protect yourself from this though by writing good quality hooks that have pluggable backends, e.g. writing/reading to an object store should be abstracted

Re:AWS Lambda and .zip is a recipe for serverless success by electricEmu on Sunday March 18, 2018 @04:53PM (#16614259)
Why would I split, write, and deploy an vendor cloud function for every cloud provider when Docker moves between them?

My team ditched serverless functions. We're better off without them.

Re:AWS Lambda and .zip is a recipe for serverless success by zapita on Sunday March 18, 2018 @06:14PM (#16614779)
Wouldn't it be ideal if Docker (and other independent platform vendors) added function support? In my mind "cloud functions" are easily implemented on top of containers. Then we would get the best of both worlds.
Re:AWS Lambda and .zip is a recipe for serverless success by gnahckire on Sunday March 18, 2018 @11:02PM (#16615968)
Check out this project: https://github.com/openfaas/faas
Re:AWS Lambda and .zip is a recipe for serverless success by electricEmu on Sunday March 18, 2018 @06:39PM (#16614905)
It wouldn't, to me.

I've had to answer many questions about delays in serverless functions that didn't come up with Docker. Serverless doesn't have the introspection necessary to answer performance questions.

What if Docker supported functions? I'd ask what we gain trading a main loop for only bindings. Similar bindings are made either way.

I honestly wish cloud providers would make their core SDKs as easily composable as their serverless offerings.

Re:AWS Lambda and .zip is a recipe for serverless success by carimura on Sunday March 18, 2018 @09:45PM (#16615658)
Exactly. This is the goal of http://FnProject.io -- power of containers + simplicity of serverless. No managed service yet but there will be, and anyone can run the bits to create a service of their own.

I do agree with Paul about containers having a greater update surface area, but we think this is also solvable and doesn't need to be a responsibility of the developer either.

Re:AWS Lambda and .zip is a recipe for serverless success by WorldMaker on Monday March 19, 2018 @04:59PM (#16623101)
The Azure Functions (Azure's equivalent to AWS Lambda) Host is open source: https://github.com/Azure/azure-functions-host/

There's probably enough there to bootstrap a container version.

Re:AWS Lambda and .zip is a recipe for serverless success by aynsof on Sunday March 18, 2018 @09:27PM (#16615582)
Have you looked into Cloud Foundry? From my understanding, it can operate like a FaaS provider or like a Docker container scheduler.
Re:AWS Lambda and .zip is a recipe for serverless success by thinkloop on Sunday March 18, 2018 @05:44PM (#16614580)
Do you manually manage the infrastructure (keeping instances hot/cold, updates, scaling, etc.)? If so that's a lot to consider.
Re:AWS Lambda and .zip is a recipe for serverless success by electricEmu on Sunday March 18, 2018 @06:48PM (#16614953)
Containers are generally managed similar to serverless.

AWS drains connections and workloads on container deployments. I set the same rules to scale either.

Containers offer flexibility that serverless doesn't for implementing hot/cold, blue/green, n running with n+1, etc.

So, additional flexibility with the same considerstions.

Re:AWS Lambda and .zip is a recipe for serverless success by phamilton on Monday March 19, 2018 @01:01AM (#16616265)
Lambda support blue/green and all sorts of flexible stuff:

    aws lambda update-alias --function-name myfunction --name myalias --routing-config '{"AdditionalVersionWeights" : {"2" : 0.05} }'
Re:AWS Lambda and .zip is a recipe for serverless success by mateuszf on Sunday March 18, 2018 @05:48PM (#16614604)
Because then every single functionality will scale independently as needed. No need for orchestration.
Re:AWS Lambda and .zip is a recipe for serverless success by electricEmu on Sunday March 18, 2018 @06:41PM (#16614911)
AWS and Azure offer cloud hosted Docker support that scales independently as needed. Both can orchestrate Docker with similar interfaces to functions.

What's the difference? Scaling isn't one.

Re:AWS Lambda and .zip is a recipe for serverless success by nostalgeek on Sunday March 18, 2018 @08:29PM (#16615357)
> AWS Lambda itself isn't vendor lock in.

Can I call my Postgres deployment on Azure via AWS lambda?

Re:AWS Lambda and .zip is a recipe for serverless success by ralusek on Sunday March 18, 2018 @08:53PM (#16615452)
Yes you can, but even that wouldn't be lock-in. Lock-in imo had much more to do with whether you have to write your code specifically to the vendor, and in the case of all 3 FaaS, the answer is mostly "not really." It is trivial to transfer the same behavior from lambda to Google cloud functions.
Re:AWS Lambda and .zip is a recipe for serverless success by ShabbosGoy on Sunday March 18, 2018 @08:35PM (#16615383)
This is a pretty fair point about service discovery. Without proper service discovery, Lambda is pretty useless IMO.
Re:AWS Lambda and .zip is a recipe for serverless success by staticassertion on Sunday March 18, 2018 @01:42PM (#16613127)
I just don't get the "lambda locks you in" thing. You write a server the same way you always would, but like an extra 50LOC exists to make it work on lambda. So if I wanted to deploy elsewhere what would the big deal be?

Lambda also provides a lot more than containerized services, as the article mentions - I no longer have to patch my system, which is a huge operational/ security burden that many companies struggle with. The time to configure API Gateway/ Lambda feels trivial compared to the work involved in maintaining a patched FAAS solution.

Re:AWS Lambda and .zip is a recipe for serverless success by paulgb on Sunday March 18, 2018 @01:52PM (#16613188)
I agree, but in my experience, the lock-in with using Lambda is that you become integrated with other Amazon services (like S3 and DynamoDB) that are harder to replace if you abandon AWS entirely.
Re:AWS Lambda and .zip is a recipe for serverless success by staticassertion on Sunday March 18, 2018 @02:51PM (#16613559)
That really doesn't feel like it's inherent to Lambda at all. You could say the same thing about EC2.

On top of that, many of AWS's services use standard API's. It's not hard to move away from RDS or Elasticache, you're just using SQL/Redis anyways...

If we're talking about something like SQS, ok, well you can just as easily say you're "locked in" when you use RabbitMQ because there is work involved to not be using RabbitMQ.

Re:AWS Lambda and .zip is a recipe for serverless success by np_tedious on Sunday March 18, 2018 @06:35PM (#16614887)
There are a finite set of this to trigger the function and they become central to

API Gateway, kinsesis, s3 change/addition...

It definitely has more lock in potential than more "vanilla" offerings like EC2, RDS, S3.

You could name a replacement/competitor service for each of the above, but if the Lambda is triggered by S3 changes then that's a big barrier to putting your static files elsewhere

Re:AWS Lambda and .zip is a recipe for serverless success by zapita on Sunday March 18, 2018 @06:18PM (#16614801)
> That really doesn't feel like it's inherent to Lambda at all. You could say the same thing about EC2.

The major difference is that Lambda hooks into your developer tooling, and source code, in a way that EC2 doesn't.

Sure, you can use Lambda without calling AWS APIs from your app... But you'll be using SDKs, tools and documentation that push you to do so, every day. It will require conscious thought and effort in your development to avoid lock-in, and over time the required effort will increase, because more and more third-party tools and libraries will switch to proprietary dependencies, dragging you along with them.

Re:AWS Lambda and .zip is a recipe for serverless success by moduspol on Sunday March 18, 2018 @03:06PM (#16613638)
To me, that's the opposite of lock-in. You can leave AWS because you can move away from any one service easily without affecting the others. There are even vendors who directly implement (for example) S3's API so you have almost no code to change.

Traditional vendor lock-in is when you can't move away from (e.g.) your Oracle database because you've got a dozen different applications that will need simultaneous rearchitecting if you ever want to get away from it.

Re:AWS Lambda and .zip is a recipe for serverless success by breatheoften on Sunday March 18, 2018 @06:51PM (#16614970)
If anything — 50 LoC seems like it might even be an overestimate. I use a wrapper function around all my lambdas that deals with translating from the aws http headers to an application standard, asynchronously retrieves a config object, and converts promise based business logic to the aws callback format. The actual business logic is then written almost entirely in terms of the business domain. The wrapper is less than 50 lines and extremely easy to write. Making an equivalent wrapper for another cloud function provider would be easy ...

Someone thinking the need to adapt the input parameter format to achieve provider portability is by itself enough reason to add docker to the application stack is making a huge mistake in accessing the relative cost of these components ...

I don’t think deploying containers to different providers is anymore standard than the differences involved in deploying cloud functions to different providers so it’s not as if using docker would actually give a more uniform multi-provider deployment model ...

Re:AWS Lambda and .zip is a recipe for serverless success by csallen on Monday March 19, 2018 @12:31AM (#16616201)
Is your wrapper code open source? If so, mind sharing a link?

EDIT: I'm actually less curious about the code, and more curious about how you're sharing code between different Lambda functions. Did you publish an npm package? Are you just repeating the code? Symlinks?

Re:AWS Lambda and .zip is a recipe for serverless success by breatheoften on Monday March 19, 2018 @06:57AM (#16617457)
The wrapper isn’t open source. The project is node (typescript) and uses serverless [serverless.com] for packaging and deployment.

Serverless allows deploying multiple lambdas with entry points exposed from an npm package using cloud formation with standard code sharing practices applying — that is it’s easy to share code between entry points if all the entrypoints are defined in one serverless config file (one serverless config file corresponds to one cloud formation stack)...

It’s a bit more work to share code between stacks with serverless tho ... You either have to put shared code into a separate npm module and depend on that module everywhere you need the shared code (often incidental complexity for simple or unstable code!) or use symlink patterns that work with the grain of how the serverless bundling process works...

I actually created an issue suggesting a serverless feature to ease this a few months ago https://github.com/serverless/serverless/issues/4124. In that somewhat long feature request I describe the symlink pattern I’m using for easily sharing code and compilation contexts between stacks... I’m still using that pattern — it’s not terribly fun to explain to new developers on the project but it works well without a lot of gotchas so far ...

Re:AWS Lambda and .zip is a recipe for serverless success by electricEmu on Sunday March 18, 2018 @05:01PM (#16614310)
Why functions over Docker or Elastic Beanstalk? There's more than one PaaS path.

On vendor lock-in, I'm moving between clouds now. Serverless did not translate well at all. We would have saved a ton of time, and frankly had an easier operational experience, if we went with Docker from be beginning.

"Ok Jill, next we need to determine how Azure Storage Account bucket calls differ from AWS S3. Oh, S3 doesn't have queues so we need to use SNS which changes the transaction model...Yeah, we've gotta handle different guarantees"

Product at most places "doesn't have the time" for developers to abstract the serverless hooks. You have to change the interface that runs your app instead.of the interface your app provides.

Re:AWS Lambda and .zip is a recipe for serverless success by philliphaydon on Sunday March 18, 2018 @09:57PM (#16615714)
Wait does Azure Storage finally have events? Personal project of mine I moved from Azure to AWS simply because Azure Storage didn't have events...
Re:AWS Lambda and .zip is a recipe for serverless success by electricEmu on Monday March 19, 2018 @12:56PM (#16620032)
Yeah, Azure Storage Accounts have events now.

https://azure.microsoft.com/en-us/blog/announcing-azure-blob...

Re:AWS Lambda and .zip is a recipe for serverless success by philliphaydon on Tuesday March 20, 2018 @02:57AM (#16626469)
Thanks!
Re:AWS Lambda and .zip is a recipe for serverless success by ryanmarsh on Sunday March 18, 2018 @02:33PM (#16613457)
I don’t understand why people complain about Serverless vendor lock in.

Let’s split lock-in into two categories:

1. Essential complexity

DyanmoDB and Firebase are different products with different features and complexities. There is no “ANSI SQL” here. They are as different as they are similar. Moving from one to the other is a non-zero cost because they have different features your app would have to make up for or adopt.

2. Inessential complexity

Serverless functions don’t necessarily need different signatures and it is conceivable that a standard for HTTP evented functions could emerge. Many are working on this. I expect this to be largely resolved over the next few years.

Lastly, I’m grateful for ANSI SQL but over the last 20 years I think I’ve seen one or two clients migrate a mature Java app from one database vendor to another (excluding some very recent moves to AWS RDS). Keep in mind that JDBC is about as good an abstraction as we’ve ever had for database agnosticism.

When you choose to build a lot of complexity upon an abstraction you have to be honest with yourself: have you ever dealt with a service (storage, queues, naming, auth, etc...) that didn’t have leaky abstractions? Of those with few/zero leaky abstractions how often did you need to migrate to a different vendor? Why do we expect a rapidly evolving set of systems and services to behave like mature commodity software?

Fear of vendor lock-in is a premature optimization.

Re:AWS Lambda and .zip is a recipe for serverless success by dev1n on Sunday March 18, 2018 @12:47PM (#16612801)
API Gateway is the literal manifestation of the worst product I have ever had the misfortune of configuring. This is mostly due to AWS's incompetence at delivering any semblance of working documentation around the product. Looking forward to their new "open source" documentation.
Re:AWS Lambda and .zip is a recipe for serverless success by nzoschke on Sunday March 18, 2018 @02:50PM (#16613550)
Check out the Serverless Application Model (SAM): https://github.com/awslabs/serverless-application-model

All of the manual configuration of API gateway vanishes because it builds up an implicit API gateway from your functions and event mapping config.

You can see a boilerplate SAM config here: https://github.com/nzoschke/gofaas/blob/master/template.yml

I'm hacking on CORS today and with SAM it's 2 lines of config to add the allowed origins and methods.

Re:AWS Lambda and .zip is a recipe for serverless success by dev1n on Sunday March 18, 2018 @02:54PM (#16613578)
I have just finished up using SAM and it is miles better than trying to wire API Gateway and Lambda together. Setting up an authorizer with cognito took some time to find the right examples and get the swagger right but yes I am a fan of SAM.

While we're on the subject, Cloudformation could definitely use some work too. AWS, please tell me what line the template failed at. We had to use the swagger extensions to integrate cognito and those were failing because of indentation errors, but it just kept complaining about invalid swagger 2.0 definitions. That is just so gross.

Re:AWS Lambda and .zip is a recipe for serverless success by Shoothe on Sunday March 18, 2018 @01:24PM (#16612997)
I can second this. I wanted to write a simple provisioning tool a while ago that sets up HTTP endpoint on API Gateway and forwards the call to Lambda and the process was extremely complicated.
Re:AWS Lambda and .zip is a recipe for serverless success by dev1n on Sunday March 18, 2018 @01:52PM (#16613187)
People (as in I) would pay good money for this tool.
Re:AWS Lambda and .zip is a recipe for serverless success by mullen on Sunday March 18, 2018 @07:15PM (#16615076)
Just use Zappa.
Re:AWS Lambda and .zip is a recipe for serverless success by ec109685 on Sunday March 18, 2018 @03:32PM (#16613795)
Another issue with Lambda is that everything goes off the rails if you need to do something that Amazon hasn’t prioritized yet. Let’s say you want a GRPC endpoint, web sockets, http/2, mutual tls authentication, etc. Lambda won’t help you and you’ll be left building up your own patterns for those. Once you have those patterns, then Lambda’s use cases can be satisfied as well.

Also, Lambda doesn’t provide any sla’s on container reuse. They could restart your container multiple times per second or every few minutes. You are at their mercy to keep your containers warm.

Finally, with the meltdown example, would containers actually need to be patched if the parent OS gets patched since the kernels are shared between host and client containers? With Fargate, amazon would patch the base OS and your containers would be safe as they get rescheduled onto patched nodes.

Re:AWS Lambda and .zip is a recipe for serverless success by manigandham on Sunday March 18, 2018 @03:56PM (#16613927)
Serverless is nothing more than PaaS - just at a more granular deployment/operation/billing/analytics scale. PaaS has always had a certain amount of lock-in because it's an abstraction, as any abstraction naturally does.

There are also some abstractions like Kubernetes that are neutral yet also managed with extras by all the providers which is a nice middle ground.

None of this is new or groundbreaking other than the silly hype words like "serverless".

Re:AWS Lambda and .zip is a recipe for serverless success by gardnr on Monday March 19, 2018 @04:47AM (#16616924)
I agree with you about the term "serverless" being silly, especially in a time when all the various forms of decentralized architecture are beginning to come of age. It makes it difficult to find information on "serverless webrtc signalling."

While other auto-scaling PaaS exist, the granularity of the lambda pricing model is fairly new and groundbreaking. A service can be launched that may see very little use and just costs pennies to test out during its initial phases. That same service will scale exponentially rather easily in comparison to a similar deployment on a traditional server.

Re:AWS Lambda and .zip is a recipe for serverless success by cdnsteve on Sunday March 18, 2018 @04:56PM (#16614278)
I suggest you take a look at https://www.openfaas.com/
Re:AWS Lambda and .zip is a recipe for serverless success by justicezyx on Sunday March 18, 2018 @09:58PM (#16615716)
It’s a cycle Depending on where you start your argument, one can be the commodity or meta commodity Your point is sort of moot Cloud for next 10 to 20 years, is still about killing old it vendors and make people not worried to put everything they own on cloud. Container or serve less is but major milestones.
Re:AWS Lambda and .zip is a recipe for serverless success by bthornbury on Sunday March 18, 2018 @02:16PM (#16613346)
Might as well throw away the automobiles and go back to horses, they're cheaper on gas.

Forget that they take more time to care for, and to learn how to ride, and how to feed properly.

Re:AWS Lambda and .zip is a recipe for serverless success by reactivesearch on Sunday March 18, 2018 @03:43PM (#16613862)
I think this is a bad analogy. Containers don't reduce convenience by a significant factor. On the other hand, what you are suggesting ...
Re:AWS Lambda and .zip is a recipe for serverless success by bthornbury on Sunday March 18, 2018 @03:59PM (#16613951)
It's straightforward logic.

Serverless platforms increase convenience.

Throwing them away decreases convenience and increases developer time to learn and launch.

Many great inventions, like writing, automobiles, all increased convenience.

Throwing away inventions that increase convenience, decreases convenience.

Re:AWS Lambda and .zip is a recipe for serverless success by Vindicis on Sunday March 18, 2018 @06:09PM (#16614731)
So is this:

Humans reproduce. Trees reproduce. Humans should reproduce with trees.

Just because something is logical doesn't mean it makes sense.

Re:AWS Lambda and .zip is a recipe for serverless success by WhitneyLand on Sunday March 18, 2018 @08:53PM (#16615453)
Then what is the point of the open source serverless frameworks our there? Or are you making that argument only within the context of aws lambda?
Re:AWS Lambda and .zip is a recipe for serverless success by mankash666 on Sunday March 18, 2018 @03:06PM (#16613635)
AWS and other managed FaaS offerings allow you to go from zero to endpoint in minutes.

You can choose to deploy your own open source Faas framework (like openwhisk or open-faas) on one of these clouds, but YOU will have to:

1. Manage scaling of underling EC2s

2. Manage security patching of both the docker and underlying OS

3. Setup whole lot of configs

4 manage optimizations

With a managed FaaS you're trading ops for more dev time, but someone has to be paid for the ops - it isn't free