Okay, I think I got it. I appreciate the explanation. After I build these DJANGO apps I'll probably look into learning that next.
Simply stated: Server-based = spin up a server with 2 CPU's, 8GB of RAM, 150GB of hard drive... run an app in it, 24x7, waiting for user to hit it... you're paying for it regardless of whether it's being used or not, and it will max out at some amount of traffic because of those server specs. It's like a remote machine you're renting in the Cloud. (Cloud just means "someone else's computer"). Billed at something like $150/month, regardless of use. "Serverless" basically means you break down your app into small pieces, and then store those pieces of application code in the cloud. Those code snippets are run only when requested by an end user. Those snippets are run in one of the bazillion available resources doing nothing at AWS. You pay only for the times that the code snippet is run. You basically have zero limitations on scale, as you're bound by the resources available by AWS... literally you could have millions of people hit your app simultaneously. Each time that lambda is hit, it's like $0.0005 or something like that, plus whatever monthly cost of your storage (S3) is (usually a few bucks per gig per month for storage).
Serverless is all the rage, for sure... but it's not a magic bullet. It can work for some things, but is not the solution for others. For instance, the financial brokerage I'm building out now is not suitable (we're using Java Spring running in Kubernetes for that), but the Facebook survey bots we're doing for another client are definitely perfect for Serverless. There are some nuances around it that take some time and experience to learn, for sure, but it's pretty easy to dig into and learn.
That seems to be a pattern with a lot of programming. It always seems difficult at first but eventually I manage to figure it out.
Well, if learning sever-less programming is cheaper, then it's a priority for me. I expect to finish building this database, commit to git hub and go find some tutorials.
The interesting part about serverless is that it's not much to learn, it's more just a shift in your mind about how the program operates. In a lot of programming, you make a bunch of assumptions about variables being available to store data for later retrieval, or writing off little things to disk that you'll need, or making calls to other areas of the program that you expect to be active. With serverless, the programming doesn't change, but those assumptions need to be modified. Your function flat-out disappears when it's done with its chore, and each function don't run inside a larger context, it's completely impossible to know what order or time different functions run in, so you need to be very explicit about handling data, calling other functions, etc. I mean, much of this is how you should be developing anyway, but given the number of code chunks I've seen with sleep(10) in them...
So it's all functions? In python, for instance, it only uses the standard library? Do you import any modules?
Go take a look at the tutorials by AWS... they do a great job introducing you to the process with some good sample code.