Real World Serverless with theburningmonk

#69: Teaching the world about Serverless with Sam Williams

November 16, 2022 Yan Cui Season 1 Episode 69
Real World Serverless with theburningmonk
#69: Teaching the world about Serverless with Sam Williams
Show Notes Transcript

In this episode, I spoke with Sam Williams, who runs the Complete Coding YouTube channel where he teaches about AWS and Serverless. He recently published a new video course called "Master AWS Serverless with 7 Real World Projects" and shared some helpful tips on picking the right course and how you can get the most from these courses.

Sam is also a serverless consultant and has helped many startups adopt serverless technologies successfully. We also discussed why it's a no-brainer for startups to choose serverless over containers nowadays!

Links from the episode:

For more stories about real-world use of serverless technologies, please follow us on Twitter as @RealWorldSls and subscribe to this podcast.

Want to step up your AWS game and learn how to build production-ready serverless applications? Check out my upcoming workshops and I will teach you everything I know.


Opening theme song:
Cheery Monday by Kevin MacLeod
Link: https://incompetech.filmmusic.io/song/3495-cheery-monday
License: http://creativecommons.org/licenses/by/4.0

Yan Cui: 00:12  

Hi, welcome back to another episode of Real World Serverless, a podcast where I speak with real-world practitioners and get their stories from the trenches. Today, I'm joined by Sam Williams, who is a serverless, consultant and a teacher as well. And someone who's been doing really good YouTube videos that I've really enjoyed myself. Hey, Sam.


Sam Williams: 00:30  

Hi Yan. Thanks, thanks for introducing me.


Yan Cui: 00:33  

Yeah, so we've interacted, I guess, online quite a few times. And I guess that we met in person at the London Community, AWS Community Day in London. 


Sam Williams: 00:42  

Yeah, that was the first time we met probably six months ago now. 


Yan Cui: 00:46  

Yeah, that was a while back. It’s really good to finally see you in person. You know, when you see someone online for a long time, and you just never met them in person, it's always good to finally you know, put a face to the person that you've been talking to for a while. So yeah, I've noticed that you finished your course, which I definitely want to talk about a bit later. But I guess before we get into that, can you maybe give us a quick introduction to you know, who you are, what you've been doing and your journey into serverless?


Sam Williams: 01:15  

Yeah, of course. So I've been using serverless and AWS, basically 100% for the last five about five and a half years now. I started when I got a mid-level developer job at a small startup. And I'd never used AWS never used serverless. But they were 100% serverless. So I went through that experience of okay, I need to learn serverless fast. So I can actually become a useful member of this team at this startup. And yeah, I found that one of the challenges when you're first starting is that, especially at the time, it's getting a bit better. But the quality of tutorials and of articles out there, especially around serverless isn't that great. So I started a YouTube channel soon after that, basically, just documenting, here are the things that I'm learning. And here's how I would learn it if I was starting again, for people that are getting into serverless. That kind of grew into a YouTube channel where I've now got, like 12 and a half 1000 subscribers. And I just teach people how to use serverless, how to make the most of it, and ways to get practical experience with it. That kind of accidentally fell into some companies and startups saying, we love your videos, can we hire you for a day or a couple of days to come in and help us build something? So I did a couple of those. And eventually, it ended up actually becoming to the point where I was earning the same doing these like consulting jobs as I was in my full time job. So at that time, I just decided to go go for it and become a full time consultant slash YouTuber. And from there, it's kind of grown. I tend to work with startups who are usually relatively early stage but looking to really use serverless to remove a lot of the blockers and a lot of the management overhead that comes with building an application normally on AWS. And yes, so for the past two years, I've worked with about 10 different startups around the world, just helping them either choose the direction of how they're going to use serverless or getting into the nitty gritty of, okay, here's a specific feature, how do we best implement that with serverless.


Yan Cui: 03:47  

Yeah, I think if you're a startup and you're building on AWS, it just doesn't make sense for you to do anything than serverless. Considering that, you know, the cost of containers is so much more operations work, and probably have to hire some specialists, just to look after your container environment. And I think one of the first my first experiences with serverless, was that we had like a three people ops team, that's mostly just doing a lot of the network configurations, setting up containers auto scaling parameters, all of that that sort of stuff, which, you know, once we move pretty much entirely to serverless, we will actually transition those, those people either into the development team or into other functions within the company, so they don't have to do anything around the infrastructure anymore. There's so little ops work that, you know, as four or five back-end devs, we can just absorb all of those additional overhead that comes with serverless in terms of operations. But you know, you just don't need those specialist anymore. And I think for startup, we don't have really complicated security requirements around VPC and networking and all of this other stuff. It just doesn't make sense for you not to do serverless anymore. So do you see many people in the sort of startup world still sort of thinking about containers, and they need a bit of a nudge to go into serverless and go into the right direction?


Sam Williams: 05:11  

I definitely do. So I think one of the reasons that a lot of companies and a lot of startups still use containers and still use that kind of more traditional architecture is that that's what the founders know. And for them, like, especially if they are technical founders, they build it, they build the proof of concept themselves, using what they know, and then go, okay, now we need to grow this. And therefore just stick with what they're using. And whilst it's great to do, get proof of concept as quickly as you can with what you know, as soon as you start getting a team, as soon as you're starting to build out your real product, I think you really need to look at serverless as an option like every startup should at least have an informed decision about is serverless going to make our operations and make our development faster. Because yeah, everyone says all serverless is more expensive. And the physical resources may be slightly more expensive than if you'd run it in your own EC2. But the fact that yeah, as you say, you can save three jobs worth of people not having a dedicated operations team, you can also develop features faster and basically allows it allows you to iterate much quicker. So I think the true cost of ownership is something that a lot of startups don't really understand or don't really appreciate the benefits with serverless.


Yan Cui: 06:44  

Yeah, I think that that… understanding the total cost of ownership is always a difficult conversation. Because as individual developers, that's not something that you really think about. You, you kind of value developer experience a lot higher than thinking abstractly about, you know, your own salaries and the time you spend on doing operations versus actually working on features, and CTOs and financial advisors, they probably, or finance operators, was it the Chief Financial Operator, you know, they probably not very good in terms of thinking about the technical side of things either. So you know, you need someone who understands both the finance side of things, as well as the technical side of things to really sort of kind of appreciate some of the total cost of ownership applications that serverless has. But I definitely think that in terms of at least certainly in terms of startups having something that, you know, you build it and you kind of know that it's going to be more or less production ready in terms of being reliable, having redundancies and having that scalability. We don't have to spend another week or two weeks just trying to productionize your application, once you've got it working on your machine which I think that's the thing that people don't really think about that, oh, you worked on my machine but then you want to go into production, you can't just run like one container or one EC2 instance, you have to think about redundancy. And suddenly your costs and the things that you're thinking about, oh, serverless is more expensive. Doesn't seem that expensive anymore, when you have to basically, in multiply the number of EC2 instances you have by two or three depending on how many AZs you want to operate in. And having that scalability to have some buffer so that you don't scale when, when everyone is having really bad latency already, you have a skill ahead of time. So suddenly, you're thinking about, okay, I have to have some buffer and all this additional capacity just so that I have got the buffer to absorb some spikes and latency in the traffic, suddenly, it doesn't look so clear cut that serverless is more expensive than the containers.


Sam Williams: 08:46  

Yeah, definitely. And if it does take those two weeks longer, then that's two weeks you're spending on wages as well. So if a developer costs, for example, 1000 pounds a week, and you've got five developers, that the fact that you are basically delaying the launch of that feature by two weeks is costing you basically 10 grand, that's a lot of Lambda, you could pay for a hell of a lot of lamda with those extra two weeks of savings.


Yan Cui: 09:15  

Yeah, and I think especially for staff, where everything's coming from one budget, that is really kind of hard to to fathom that someone will think though, using containers and doing all this extra work is worth a while. And I've seen in enterprises where this may be slightly different just because your headcount is coming from a different budget to your AWS budget. So it's sometimes it's easier for like a team lead or manager to justify hiring two people and to spend 100k on those salaries versus spending an extra two grand on the AWS for using Lambda versus running containers.


Sam Williams: 09:54  

Yeah, I think enterprise is always a little bit different plus there's always the eventually you do get to the scale where actually hiring a team of three operations, like developers or operations engineers and saving on the servers cost can become theoretically valuable. But I think at that point, yeah, you need to be at the, like, hundreds of thousands of AWS dollar bill a month to to even consider that being a valuable switch to make.


Yan Cui: 10:29  

Yeah, and the funny thing is that a lot of the enterprises, they don't really have that many high throughput applications where you will be significantly more expensive to run on, on serverless compared to containers. A lot of them has got really complicated the requirements in terms of security and all that. But the actual applications that they built, they are often not that high, not very high throughput. So I guess I want to in that case, a pivot slightly and just to find out a bit more about some of the common challenges, some of the common trends you've seen in your work as consultant, what are some of the biggest things that people struggle with.


Sam Williams: 11:08  

So the first thing that I always do with a client is make sure that they are on multiple AWS accounts. There are a lot of startups who have their dev, their testing and their production environments all in a single AWS account, which is okay when you've got one or two developers. But if you're starting to grow a team, then you want to be able to isolate your production environment, for security for ease of control. And also just making sure that nothing you actually deploy in dev ever interacts with what you're doing in your production account. So that's just kind of a quick win we can always implement. And then from there, it depends on like the technical, technical requirements of what they're trying to build. But what I do find is that there are probably six or seven like architecture patterns that I can usually get 80% of the architecture for a feature from one of those seven patterns, anything from as simple as just API gateway, Lambda, going to Dynamo. And that Dynamo having a certain set of keys, whether it's single table design, or not, all the way up to just like having an EventBridge template, where there is something streaming from Dynamo, going into EventBridge and then being processed on the back of that. So having those templates and being able to get started and get get 80% of the way there is a really useful thing.


Yan Cui: 12:46  

Okay, so I guess that seven patterns that you identified, is that an inspiration for your course which basically takes people to build seven different kinds of applications using serverless technologies?


Sam Williams: 13:00  

So they are relatively similar, but they're not, they're not exactly the same. So the course is designed basically to take someone from having little or even no AWS experience, to building event driven applications all in serverless. So the first couple of projects are kind of a real introduction to serverless. It's building an API that can then call multiple other APIs and then combine the data. This probably isn't, wouldn't be large enough to call like a serverless architecture pattern. But it is something that I've had to do quite a few times as a developer and as a consultant where it could be you need to call two different delivery APIs for your like order shipping. And you want to return some combined data. So even the first project that we build in the course, is based around things that you are likely to do as a developer, in a real serverless environment. And then they get basically increasingly complex and increasingly advanced as you add Dynamo streams, or you add WebSockets, Cognito for authentication. But instead of just going here is a massive architecture build, this is your first ever project. I try and introduce it where each project is kind of building on top of what you've learned in the previous projects, whilst adding something new. And I think that reinforcement of what you've learned before is really good. I see a lot of projects where there's like three projects. And any when you finish the first project, the second project uses nothing. There's no reusable knowledge. And I find that that means that you don't practice what you're learning, which means it's harder to retain it in the long term.


Yan Cui: 15:01  

Yeah, I definitely find that as well. And I also find that a lot of times students don't finish the whole thing, or they watch a video and then they forget some of the really important messages that he's trying to convey there. Despite all my best efforts to highlight things, made them really big, or just really call out certain things. But I think that this retention is a really common problem when it comes to learning. And I guess, you know, we've all been in the classrooms, We've all forgotten things that teachers have told us very, very clearly that this is how it works. And sometimes you remember the wrong thing. Someone says, you shouldn't do this. But that's the only thing you take away. So this thing, let's do that. I guess one question, I guess in that case, I would like to ask is, you know, what are some of the advice that you have for students, in terms of what sort of courses they should take? Because there's obviously a lot of getting started the Hello World tutorials out there for serverless. And I think there is this lack of courses that take you through a whole project end to end. Because, you know, as someone who's new, you kind of need a bit more, I guess, when you're learning something new. And you know nothing, nothing about it is more or less the case of monkey see monkey do, and you want someone to show you the ropes, all the ways from just writing your first function to deployment to, you know, testing to all these different things you're gonna have to think about at some point, rather than, you know, just show you the basics, and then leave you to learn from different articles, different places, different authors will have different philosophies, different ideas, and force you to kind of come up with a way to unify all these different disparate pieces of information you've collected into a cohesive strategy of how you will develop serverless applications. So I think, you know, in terms of students, what are your advice for how best to choose the right course for themselves? But also what to do to make the most of these courses?


Sam Williams: 16:57  

Yeah, that's a really, really good question. So I think the first thing is, if you are completely new to AWS, and completely new to serverless, there is nothing wrong with doing your first ever Hello World tutorial, some free free video or free article, that's fine. But I think if you then go, Okay, I do want to become a really good developer, that's when it's worth investing the time and the money in a proper course that is going to be consistent through how it teaches you and consistent through its approach. Like AWS, I think you recently posted about AWS being really open and not being very opinionated in how you do things. And the challenge with not being very opinionated is lots of people can do the same thing in different ways. And trying to learn by piecing together tutorials, as you just said, you've got to try and figure out how to make those two things work together. With a course that is from one creator or one teacher, where it takes you from end to end, that means you're going to have a consistent opinion. And when you're first learning, you want to learn one opinion. Once you've completed that course, you can learn other opinions and adjust how you do things. But to start with, learn how to do it one way, and then move on and like become good at using that methodology without adding extra confusion with lots of different ideologies. In terms of making the most, I see a lot of a lot of students and a lot of people who are learning serverless, who will take a course, and will just sit there and watch the videos, especially if it is a like an in in depth coding related tutorial, I would 100% recommend having your video on one screen and ideally like your code editor on another and actually write the code as you're going along, partly because you're actually you'll get used to the fact that you're importing things from files, you'll get used to how basically how your your developer environment works, whether it's VS code or something else, but also, eventually you'll do a typo, you'll make a mistake, you'll do something slightly wrong. And actually that bug fixing process of my code isn't running the way it's meant to. How do I figure out what's gone wrong? That I think is a really important part, which you miss out on if you just watch the videos.


Yan Cui: 19:37  

Yeah, absolutely. And I think there's been a lot of research that shows that taking parts while taking an active part and as you're doing stuff yourself, you know, you're learning also muscle memories and also other mechanisms start to kick in. That means that you are much more likely to remember something because memory is not just about visual, you know, it is from different kind of sensories, you know, the smell the… while we can’t produce the smell from code, but, you know, in terms of the environment you're in, in that moment in time, they all help in terms of you remembering something. So that's definitely something that I think more and more people should be doing in terms of, you know, actually following along the code examples when people are, when you're watching a video, and just type along. I guess in that case, you know, once they completed your course, and they've learned the basics, where would you say, you know, how do you then continue to learn after that? Because obviously we can't teach everybody everything all at once in a single course. So where are some of the places you would go to say, Okay, I want to further my learning. Now that I've taken Sam's course, I've got the basics down. So you want to learn specific topics, where would you suggest people go?


Sam Williams: 20:51  

So I think the first thing I would suggest after completing any course, is to try and replicate it yourself in a slightly different version. So for example, in your course, the AppSync masterclass, I would try and build some other application that uses AppSync, uses all of the direct DynamoDB connectors uses all of the things that you're learning inside that course, because without actually following along, you're you're reinforcing that learning. And you'll, you'll also come across slightly different challenges. And you'll think you'll have to think a lot more about how you want the application to work instead of just copying the code. So I think that that is one of the things that I think everyone should do when they complete a course, to further ingrain that. You can still look back at the the original course and go, Oh, I can't remember this one but I'm gonna go and look and see how Yan did it in that bit, or how Sam did the, I don't know, Dynamo streaming bit. I can't remember that. Let's just check that again. But yeah, having the ability to reinforce that with it, with your own project that uses all of the things you've learned is really important.


Yan Cui: 22:11  

Yeah, that's a really good call. Again, there's nothing better than to get your hands dirty when it comes to learning and absorbing knowledge. And actually speaking about that actually I had a few, a couple of students who told me that they've took my course AppSync masterclass. And they went on to build an app. And they launch the app pretty much using a lot of the same idea, the same so approach that I've shown, I've shown them in the course. And along the way, they've had to figure out okay, how do I do this thing slightly different from how Yan's done it? And from the question they've asked, they've come up with some really interesting solutions themselves or they get stuck, they can still come back to me and ask me on the forum, or just reach out to me on the social media, which I'm sure you get a lot of comments and questions via your YouTube videos as well that okay Sam, this is great. I love this. But then I've got a slightly different requirements. How do I go about doing this?


Sam Williams: 23:07  

Yeah, definitely. That's, that's something I do spend quite a lot of a lot of my week doing is replying to LinkedIn messages or replying to like comments on YouTube, where people are like, Oh, this is great. And how do you do it slightly differently? And I think, a lot of the time, some of the questions are, people ask an expert, instead of trying to figure it out themselves first. I think if you do get to this situation, and you are stuck, the best thing is try and figure it out yourself, do some Googling, because Googling is a superpower as a developer. If you're really good at Googling, then you'll do a lot better, and try work it out. If if you get to the point where you've spent some time trying to figure it out, then go and talk to an expert and say, this is the problem I'm having, this is what I've tried, this is still not working, how do I improve it? And I think as a as a creator, like, if someone comes to me with that, it shows that they have done the work. They've tried to solve it themselves. Instead of someone going, Oh, how do you set up a Dynamo table with a GSI? And you can just literally Google exactly what they've said. And the first result is exactly what they need. I think, yeah, doing doing a bit of the the work yourself is going to help you get a better response from the experts as well.


Yan Cui: 24:36  

I've definitely had lots of questions where exactly that I'll just search I showed them you just Google this and you'll find what you're looking for. But sometimes people just feel lost. I can understand that they want to reach out to someone that they've kind of feel some connection to because they've been watching your videos or they've been taking your course. But yeah, there's a lot of things you could find on Google on on Google these days. But there's always a danger that you may not find the right answer, because again, the internet is full of different opinions and approaches that it's sometimes hard to tell what's the right approach. I guess, Sam, and now that you’ve wrapped up the course, what's next for you? What's your next project? What are you thinking about doing next?


Sam Williams: 25:19  

So I'm actually involved in a YouTube growth programme. So I've meeting up with them on an intensive course with a load of other youtubers from a range of different topics, not just software development, and trying to work out how to make videos that are as educational and also as helpful to as many people as possible. So the videos are going to change slightly. They're maybe… they're going to vary in technical length and technical depth. But I think hopefully, this will get more people involved in AWS and involved in serverless. So yeah, that's what I'm going to be focusing on until the end of the year. And then next year, I'm not quite sure yet. There's a couple of ideas floating around for possible future courses, or possibly even running this current course as a cohort. But yeah, those are all ideas that I need to need to consider.


Yan Cui: 26:18  

I definitely think it’s worth turning the video course, especially after some time, once the content may be slightly out of date into some more like live kind of based learning. That's one of my experience with the production-ready serverless. I did a video course for Manning. It was about five years ago. And what you quickly find is that while some things change, even small, small details can change. And then the code that you show them doesn't work exactly as it as it was. And if you want to change that one tiny bit, you have to basically re-record everything, because that may be lesson one and then that is used in lesson two, and three, and so on and so forth. So it's really difficult to change videos, especially for the ones that you are showing them hands on how to write code from start to finish. It’s really difficult to maintain that. So once you've got the basic concepts, sort of locked down by producing the video, you know what sort of things people want to learn also how to teach them, turning that into a more of a cohort-based learning makes it a lot easier for you to just continue to update it, especially around this time, re:Invent is just around the corner, I'm pretty sure a half of the things I've got I've got out there are going to be outdated by the time re:Invent finishes. So you know, if you have to re-record everything every year, then I'm never going to do anything new. So being able to have something that's easier to update and maintain and iterate is going to be a lot easier for both yourself and also for learners. They will want to learn what's the latest thing that you want to say, Sam, versus the the advice you gave last year, which has been completely outdated by some new announcement they made at re:Invent.


Sam Williams: 28:00  

Yeah, I completely agree about that. That's one of the things I'm finding with YouTube now is that basically, a lot of almost all of my earlier videos are using the serverless framework version two. And now the serverless framework version three is out. And there's loads of people who are like, Oh, I've tried running this and it doesn't work, or this field is invalid or something. And yeah, it's definitely a challenge that, that we've got to… that's kind of the thing with with software and with tech is that it changes so quickly, especially serverless. And I think, kind of it's a double edged sword. It's really, it's frustrating when code you wrote six months ago, you can't just copy and paste into a new project. But also it means that because the knowledge is changing so quickly, if you as a new developer can get up to speed with what is valid now, then you're very quickly going to be at the same kind of technical technological level as someone who's been using it for three or four or five years. So serverless is a great opportunity for new and junior developers to really accelerate their way up the up the career ladder.


Yan Cui: 29:13  

There is a really, really good point, I'm really glad that you mentioned that. Because again, me personally I've gone through AWS from running EC2 instances to containers and to serverless and I have to say the amount of things you have to learn about low level networking to make it work on AWS almost takes an entire degree to to understand all the different different knobs you have in terms of how you can configure VPC security assets, you know, how to interact with other ACL settings and other different security groups and all these different things. You can pretty much ignore all of that if you're building fully serverless and building APIs, you're building other things. I mean, you still have to learn CloudFormation and IAM but those are much easier to learn than to, you know, learn and trying to debug network issues, and how to manage and patch this EC2 instances, machine images, which are all things that people have to spend many, many years to try to master and do a decent job of. And now you can kind of just sidestep a lot of that and get to the really good stuff, but still get the benefit of somebody else who's dedicated their lives into making sure you've got this infrastructure that is scalable, that’s a secure, that's reliable. So I think absolutely, if you're a developer, especially junior developer, totally agree what you said that, you can just go very far very, very quickly, by using serverless technologies and get to the point where you're very productive compared to your colleagues. But we don't have to know a lot of the things that they've spent years trying to learnand now have been deprecated. So yeah, Sam, thank you very much for taking the time to talk to me today. And I wish you best of luck with the YouTube growth programme and look forward to the changes that you're going to be doing on your videos. And I hope to see you use your wonderful lightboard a bit more in future videos. I thought that was really good.


Sam Williams: 31:09  

Yeah, thank you very much. And definitely we'll be seeing a lot more of that over the over the next year because it's really good fun to play with it as well. And I think being able to discuss architecture and discuss those kinds of the thought process behind architecture while drawing it in a really cool and interesting ways is something you don't see out there very much. Like a lot of the, the AWS tutorials are just like things on a whiteboard. And just the fact that you have to turn your back on the audience every time you want to draw something. I think having that being able to look at someone and then look at the architecture is really nice and novel way of doing it.


Yan Cui: 31:53  

If you don't know what we're talking about here, so Sam basically built his own lightboard, really big lightboard and he did a video which I’m going to link in the show notes below. You can check it out. And yeah, it's it makes drawing on architectures on whiteboards a very different experience for you as a viewer of these videos, but yeah I think the cost of buidling those ligthboards is very cheap but if you want to buy one yourself that is really expensive. That's probably why you don't see many of them around, at least not on the YouTube videos. So yeah, good job, Sam, making a video by yourself and best of luck going forward.


Sam Williams: 32:32  

Thanks very much. And I just want to say as well. If anyone is interested in the course then I'm sure that Yan can put a link to that below. And for for your listeners, I can give you a discount code so that you guys can get a little bit off off the full price. So that'll help you if you are interested in getting into serverless development.


Yan Cui: 32:55  

Perfect. I will link the course as well as the discount code in the show notes as well so that you guys can have access to that. Again, thank you so much Sam and wish you best of luck and hope to catch you in person next year. 


Sam Williams: 33:07

Yeah, definitely Have a great day, Yan.


Yan Cui: 33:10

You too, cheers mate.


Yan Cui: 33:24  

So that's it for another episode of Real World Serverless. To access the show notes, please go to realworldserverless.com. If you want to learn how to build production-ready serverless applications, please check out my upcoming courses at productionreadyserverless.com. And I'll see you guys next time.