AWS Bites Podcast

1. When should I use serverless?

Published 2021-09-09 - Listen on your favourite podcast player

In this episode Eoin and Luciano talk about what it means to adopt serverless, when you should use AWS Lambda, and when you should not use serverless.

Let's talk!

Do you agree with our opinions? Do you have interesting AWS questions you'd like us to chat about? Leave a comment on YouTube or connect with us on Twitter: @eoins, @loige.

Help us to make this transcription better! If you find an error, please submit a PR with your corrections.

Eoin: Hello, everyone, and welcome to another episode of AWS Bites, the weekly show where we try to answer questions about AWS in just five minutes. My name is Luciano.

Luciano: My name is Eoin.

Eoin: And today we have a very interesting question. So when should they use serverless? Eoin, what do you think?

Luciano: I like to think that you should use serverless always. It's not practically possible, but I suppose the mindset we use is serverless first. There are a few cases where you might not be able to use serverless and everything. But maybe before we go deep on that, what do we mean by use serverless? Do you mean use Lambda functions for everything or is there something more to it than that?

Eoin: Yeah, I think that's a very legitimate question because I think that the common conception is that serverless is just functions as a service like Fuzz and Lambda. In reality, I think that there is a lot more to that. It's more of a mindset. It's not just that specific tool, but it's more the idea that you should worry less about the infrastructure and managing that infrastructure. So you should focus more on the business logic, try to write only the code that adds value to your company, your business mission, and not focus so much into how do I provision this machine? How do I keep it up to date? What operative system am I using? Is it secure? Is it fast enough in terms of network? So I think serverless is when you start to think more in terms of business value rather than servers, I guess. Yeah, I like the idea that serverless is a journey and not a destination.

Luciano: So it's more about the fact that you're constantly looking for things you're doing every day that's taking you time that isn't really critical to your business and you're trying to figure out how you can move that responsibility to somebody else, AWS or some third party SaaS with an API. And I really like that. So if that's the case, where does serverless not work or where would you not use serverless Luciano?

Eoin: Yeah, I've seen a few interesting cases in my career where even though I really wanted to use serverless, I don't think it would have been the most practical choice for the type of context. For instance, very often I had to deal with companies that had long investment in products that were very stable, of course, built even before serverless was a thing. So just the idea of transitioning all that big application, maybe it's like a monolith written in Ruby or Rails or Django or something like that to serverless will be such a big investment that it becomes really prohibitive and doesn't really give anything back to the company to try to do that. So that's definitely one case. Another one is where I've seen companies going to the cloud, but with this idea that they wanted to keep themselves as abstracted as possible from the vendor. So they chose something like Kubernetes and they spend a lot of time making sure that they have a solid way to ship code into Kubernetes. At that point, I wouldn't really suggest that they move from that to serverless. I don't know. Have you seen any other interesting case that might be worth bringing to the table? Yeah.

Luciano: I mean, I think if you've got a stable application that already makes a lot of money, I wouldn't be rushing just to migrate it to serverless just because you feel like using the latest and greatest in cloud tech. There's a cost of switching in all cases. And if you don't really have to go touching something that works and makes you money, why bother? But on the other side of the scale, if you've got something that's new, you want to do a lot of experimentation, maybe something where you're working in a real kind of lean organization and you're happy to build, throw stuff away, get that feedback loop going, rinse and repeat and really iterate on the product. Serverless is really, really good for that because the cost of creating and destroying resources that are serverless is next to zero. Whereas if you spend a lot of time, you know, racking and stacking virtual infrastructure, you know, building auto scaling infrastructure with EC2, there's an investment up front and all that and into, you know, your operating system and your security patching and all of that with services like Lambda, DynamoDB, Aurora Serverless, you don't have to worry with that so much. So you can adopt them and drop them really quickly. Right. So where do you think that serverless really shines?

Eoin: Oh, yeah.

Luciano: Well, like I say, if you've got, you know, a lot of potential for change, which let's face it, we all do, especially at the start of new product development cycles. Also, but if you've got unpredictable workload, you know, if you're a startup and you're happy to adopt this technology and you're, you know, you're willing to invest the time into the skill set, it's really suitable because if you're not earning any revenue, you're not paying for anything generally. So it scales with your business. And that seems really fair and it means you're not likely to, you know, incur significant costs when your company is at a nearly stage of growth. But I'd say the same, same goes for other, even in enterprises where you're trying to build new products, serverless really shines there too because you the cost of experimentation again, it's just really low. So it really fosters that mindset where, you know, people can just really push the boundaries of what you're doing and don't have to be adhering to existing models for building software anymore. Fair enough. Yeah. Yeah.

Eoin: As a closing note, I just want to say that it's easy to say, let's do everything in a serverless way, but of course there is a learning curve as well. So if you never done a serverless project, it might take you a little bit of time to just get comfortable with all the tooling, how do you do testing, local development, deployment. So that's also something to keep in mind whenever you are starting a new project with serverless for the first time. I think it's going to pay off of course, but don't discount that initial learning curve. So, okay. I think that that's all we have for today. So thank you very much for being with us and let us know what do you think? Leave us comments. We are really curious to know what do you think about serverless? If you're using it, what are your challenges? And make sure to follow and subscribe. So we'll see you at the next episode. Bye.