How to Deploy AWS Lambda: Toward a Serverless Architecture
Since Amazon Web Services (AWS) launched AWS Lambda—its disruptive “serverless” architecture in November 2014, we’re witnessing a major IT paradigm shift. On our Udemy platform of 24+ million learners, we noticed AWS Lambda was the 10th fastest-growing skill in 2018.
With Lambda, AWS is revolutionizing how cloud hosting works. Instead of renting and managing entire servers to run your website (whether users navigate it or not), you can pay for functionality usage based on demand. With AWS Lambda, you can isolate and deploy a specific functionality of your website like resizing photos or messaging, and Amazon will take care of auto-scaling this function to implement this particular task. You only get billed when the function is being run, and you don’t need to provision or scale servers, hence the name “Serverless.”
The recent State of Serverless Report 2017 revealed 43% of company respondents are using functions-as-a-service (FaaS) platforms like AWS Lambda, Azure Functions, or Google Cloud Functions. For example, The Seattle Times uses an AWS Lambda function to automatically resize images for mobile, tablet, and desktop devices every time an image is uploaded to their website. They only pay for server usage when the function is run.
The benefits of AWS Lambda are game-changing. Here are some of the main advantages for IT teams and how you can deploy AWS Lambda at your organization.
Serverless means auto-scaling
Traditionally, developers provision servers to run applications, but the servers often sit underutilized if the applications aren’t being used. With Lambda, you don’t need to manage or scale your servers up or down, you can rely on Amazon to do this, which is why it’s called “serverless.”
Pay as you go
The pay-as-you-go approach means IT departments can enjoy significant cost savings. To give you a sense of the cost savings: if in a 1-month period, an AWS Lambda function processes 1 million function requests (e.g. uploading a video to your website or resizing photos), it will cost you around 20 cents. But if you rent an entire server (even a cheap one) like the AWS T2 Micro for that purpose, it would cost you around $8.00 per month. Now consider high traffic websites with even more requests, and you’ll have potentially big savings compared to running several provisioned servers.
No more 2:00 am calls
The fewer people involved in managing servers, the better for the stability of your infrastructure. Relying on AWS Lambda also means it’s easier for your IT team to track down errors and failures. Plus your IT team won’t need to be called at 2:00 am. AWS will take care of managing and troubleshooting your servers for you.
Before the cloud, IT teams were buying and managing their own on-premise servers. Then IT infrastructure migrated to the “cloud” with managed server services. The next big disruption is the move toward serverless architecture with AWS Lambda. Using AWS Lambda’s serverless architecture, an IT team of just 5 people can run a social media platform for 1 million people.
Today, if I had to create a new website, I wouldn’t rent entire servers. Instead, I would run the entire website using functions on AWS Lambda and I would sleep well knowing AWS is taking care of scaling for me.
Getting started with AWS Lambda: What you need to know
But what does your IT team need to know to deploy AWS Lambda? What works and what doesn’t? What skills will your IT team need?
What works and what doesn’t
The first step is to start by breaking down your monolithic website into functions and then put these functions onto AWS Lambda. This will help you scale your server use and reduce costs. However, long-running jobs don’t work on AWS Lambda such as converting a video. Lambda functions need to be quick to execute like instant messaging or likes and comments features on a social media website.
4 skills your IT team needs to know to deploy AWS Lambda
The second step is train your IT team with the skills you’ll need to deploy AWS Lambda. I teach a AWS Lambda and AWS CloudFormation Master Class on Udemy for Business that can help equip your IT team with the necessary skills. Find out more about a cost-effective Udemy for Business subscription for your IT team.
Here are the 4 skills your IT team should master:
1. How to use a serverless framework
In my Udemy for Business course, AWS Lambda and the Serverless Framework: Hands-On Learning, I teach a framework to help people deploy and manage functions in an easy way. If you go to AWS Lambda and upload your code, it can be a tricky and manual process. Serverless.com instead developed a developer tool to handle this process called the “Serverless Framework.”
In my course, I teach the basics of AWS Lambda, how it works, and how to get started using the Serverless Framework tool. I also teach how to build and deploy 3 real-world functions including resizing images and building an API on the cloud. My course teaches all the key building blocks in an easy step-by-step process and gives you a massive head start in deploying AWS Lambda.
2. AWS Lambda is language agnostic
3. Know the ins and outs of solution architecture
It’s also good to know the ins and outs of solution architecture on AWS such as what components the cloud offers. You need to know the details of AWS cloud services to make the most out of the Lambda function. The Udemy for Business course, AWS Solutions Architect Course, is a good place to start.
4. Infrastructure as code
Another new related trend is “infrastructure as code” or programmable infrastructure. What this means is writing code to manage server configurations as well as automate provisioning and deployment of infrastructure.
AWS CloudFormation lets you manage your AWS infrastructure using code and eliminates any manual management. AWS CloudFormation can help IT teams increase the safety of their cloud infrastructure, reduce manual work, and enjoy easy reproducibility. With infrastructure as code, if your account got deleted, you could still recreate it by running the code. Should any disaster happen, businesses who manage their infrastructure using code could rely on this code to recreate everything. Essentially, nothing would get “lost.”
In my course, AWS CloudFormation Master Class, I teach how to create a cloud formation template in a clear, step-by-step approach. With my course, it only takes 3 hours to learn the skills you’ll need to implement infrastructure as a code compared to reading the 1200-page AWS manual on the same topic.
AWS Lambda is an exciting new approach to the cloud. While breaking down your website into functions might seem daunting, in the long-run, the cost savings, peace of mind, and ease of use make it worthwhile.
Top courses in AWS Lambda
AWS Lambda students also learn
Empower your team. Lead the industry.
Get a subscription to a library of online courses and digital learning tools for your organization with Udemy for Business.