Serverless is a new methodology for building and running web workers. If you’re familiar with Python, you have all the knowledge you need to build a scalable and modern web application. Let’s go over some basics and discover how Stackery can help.
These are five general characteristics that classify cloud services as serverless:
The seed of any serverless application is a serverless function. Rather than a full web server with the code necessary to handle web requests, a serverless function (in AWS, serverless functions are called Lambdas) contains just the logic needed to handle an incoming event from an API Gateway or another source.
Remember that, on their own, serverless functions on AWS can’t even communicate with the outside world. The critical takeaway is that while serverless starts with functions you need more than functions to do anything.
Serverless applications have three components:
Many early tutorials start with serving a simple HTML response by hooking an API Endpoint to a serverless function (AWS Lambda). This is an okay way to start learning but in general serverless functions should be doing work not serving static assets.
Python is an ideal language for writing serverless: high-level languages reduce dev time and lets you focus on business logic.
The software needed is all freely available and all you’ll need is an AWS and a Stackery account
Watch our quickstart video to see how!
Once you’ve built your first few Lambdas, it’s time to actually do some work with your them. Check out our guide to building a web scraper in Python.
If you’ve already built your Lambdas, you know that most of the challenges of serverless come not with building Lambdas but with maintenance and management. Serverless means not worrying about OS updates or detailed server management, but when you need to test new code, things can get tricky.
The first and most significant hurdle is having to deploy to AWS every time you have new Lambda code you want to test. When you’re waiting five minutes to test a single new line of code, development can slow to a crawl.
AWS, well aware that people don’t want to wait 5 minutes to test their code, has released the SAM CLI to let you test your Lambdas locally. It is a great tool with some severe limitations.
So how do you debug things like a DB request from a Lambda? Enter the Stackery CLI. It lets you run your Lambdas locally, while still sending requests out to resources in the AWS Cloud
Try the Stackery CLI today to see it in action!
Experience cloudside development with Stackery – select and configure services, develop Lambdas locally against live AWS services and manage your serverless apps from pipeline to production.