3.67 out of 5
3.67
3 reviews on Udemy

The Comprehensive Guide to AWS Lambda Functions

Learn how AWS Lambda Functions can work with S3, SNS, and CloudWatch to build the most robust cloud infrastructures
Instructor:
Ahmad Al-Fakharany
114 students enrolled
English [Auto-generated]
Choose when to and why add Lambda functions to your AWS infrastructure stack
Build a real-world web scraper using only Lambda functions
Enhance CloudWatch standard alerts by invoking Lambda functions midway
Use Lambda functions for scheduling repetitive tasks

Infrastructures have always been evolving since the “old days” when apps used to live on physical servers, the not-so-old days were when  every app had its own virtual machine, and multiple virtual machines shared the same physical server. Recently, we had containers and each virtual machine could host several apps. But the future is serverless computing, where apps don’t even need a server to run on!

Welcome to AWS Lambda functions. You can use Lambda functions to invoke “code on demand“. Gone are the days when you had to pay for a machine that should be up 24×7 to perform tasks that take a tiny fraction of this uptime.

In this course, I assume no prior knowledge of AWS Lambda functions and take you right from the beginning in an exciting journey. In this class, we start by a little – but important – but of theory:

  • How to determine if your specific use case is a good candidate Lambda functions

  • How to write a Lambda function from scratch and configure it for optimum pricing

In this class, I intentionally give little room to theory and much more room to hands-on labs. After all, this is how you’ll work with Lambda functions afterwards, and how you’ll land your future job as an AWS cloud engineer, who is proficient in using Lambda functions. So, we start getting our hands dirty and:

  • Draw an overview of the main application that we’ll be using in our labs: the G2CSV. It’s a simple – but powerful – application that takes a keyword or more, searches Google for them, extracts the URLs and titles of the first-page’s results, and saves them in a CSV (Comma Separated Values) file. Pretty simple right? This app will not be running on any servers. It’ll work only using Lambda functions.

  • Then we explore different ways to trigger our app to work. First, using an S3 trigger, where a file upload action will invoke our app/function.

  • S3 is not the only valid trigger source for Lambda functions so we also explore SNS (Simple Notification Service) as an event source.

  • In an optional section, I take this app even one step more and add a web graphical user interface (GUI) so that the end user can type the keywords and send them. We’ll be using a combination of Lambda functions, SNS, and S3 to make it all work.

  • In the last part of the course, we visit CloudWatch, an integral and very powerful part of AWS. We use Lambda functions to add more detail to our regular CloudWatch events about different aspects of a running EC2 instances. Instead of just reporting a CPU spike, a Lambda function can tell you which process caused this anomaly and – optionally – take actions against it. The alert still follows its normal route through SNS, so changes should be made to how recipients get the messages.

  • Finally, we explore a second way of how a Lambda function could run: self-invocation. Here, we build a second app, which will be used to aggregate exchange rates hour-by-hour from an API and saves the results to an S3 bucket. This will be a demonstration on how to use Lambda functions in cron-job mode.

What are Lambda functions and the FaaS model

1
Get to know AWS Lambda functions
2
When to use Lambda functions and when not to use them
3
Your first Lambda function
4
Lambda functions configuration settings
5
Creating a Lambda function using the CLI
6
Calculating Lambda function pricing
7
AWS October 2018 update

Maintaining your Lambda functions

1
Project overview: A Python web scraper using a Lambda function
2
Packaging third-party modules in the Lambda function
3
Lambda functions logging and exception handling

Using S3 as a Lambda function trigger

1
G2CSV: a Lambda-based web scraper
2
Refactoring the Lambda code to accept multiple keywords at the same time
3
Extracting the S3 bucket and key from the Lambda event
4
Building and running the Lambda-S3 workflow

Using SNS as a Lambda function trigger

1
What is AWS SNS? Why integrate with a Lambda function?
2
Examining the SNS event sent to Lambda
3
Running the Lambda function locally
4
Save 99% of Lambda code upload time by using S3

[Optional] Build a real-world web-scraping app using Lambda, SNS, and S3

1
Application roadmap: Docker, Nginx, Flask, Lambda, SNS, and S3
2
Building the Docker image and running the app
3
Allowing public download from S3 bucket and finishing up

Using CloudWatch with AWS Lambda

1
Why using CloudWatch alone might not be sufficient for your alarm needs?
2
Creating a CloudWatch alarm, the traditional way
3
Building our helper Lambda function
4
Extracting useful information from the CloudWatch alarm data
5
Extracting the EC2 instance's IP address or DNS name
6
Establishing SSH connection to the EC2 instance using Paramiko
7
Workaround for macOS and Ubuntu users by using Docker
8
Using Lambda functions in the cron job mode
9
Storing exchange rates updates periodically using a Lambda function
10
Exploring different Lambda cron job options
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
3.7
3.7 out of 5
3 Ratings

Detailed Rating

Stars 5
0
Stars 4
1
Stars 3
2
Stars 2
0
Stars 1
0
828753890ea50fab2e4a292a94fdbb3c
30-Day Money-Back Guarantee

Includes

5 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion