
Develop and deploy AWS lambda functions using Python and boto3, including packaging and policy assignment, to a serverless cloud environment across JavaScript and Python runtimes.
Learn to build and deploy AWS Lambda functions with Python and Java, packaging and running them with proper permissions and runtime, and deploy them to AWS using Boto3.
Review the required setup for lambda functions, including an AWS account with a free tier up to 1 million requests per month and PyCharm community edition for Python development.
Sign into the AWS management console, switch regions, and access account, billing, and recent services through the navigation. Explore service discovery, pinning favorites, and overview of costs, organizations, and governance.
Create an IAM user for programmatic access, attach policies, enable multi-factor authentication, and generate the access key and secret key for AWS resources.
Install Python 3 and pip on Windows by downloading from python.org and customizing the installer. Add Python to PATH and verify by opening a command prompt and typing Python.
Install and verify the AWS CLI on Windows, downloading the 64-bit installer, accepting license terms, adjusting the path and environment variables, and confirming the aws command runs.
Install boto3 and its dependencies with pip to prepare your Python environment for working with AWS resources.
Verify python 3.6 installation, confirm aws cli is configured with access keys and region, and ensure boto3 is installed so you can start building lambda functions with aws resources.
Create an identity and access management client, define a policy for lambda to access s3 and cloudwatch logs, serialize it as json, and attach it to the lambda execution role.
Create an IAM execution role for a Lambda function to permit actions against AWS services, define the assume role policy, and attach the access policy to enable execution.
Create a Python utils class with static methods to build a zip file from a source directory and read its bytes for AWS integration, using os.walk and zipfile.
Develop a Python lambda function by creating a handler, wiring event and context, and returning a JSON response with a 200 status and a hello from Python lambda function message.
Deploy a nodejs lambda function by configuring the runtime, naming the function, and invoking a generic deploy method to create the AWS lambda and view its response.
Explore the AWS console to inspect a Node.js lambda function, verify its execution role policies for S3 and CloudWatch logs, and review its source code, runtime, handler, memory, and timeout.
Deploy a Java lambda function by configuring a Java 8 runtime, packaging a jar, and uploading its bytes to AWS Lambda, including setting the correct handler and package path.
Deploy and verify a Java 8 AWS lambda function in the console, ensuring proper execution role, policies, CloudWatch logging, a complete code package, and readiness for versions and aliases.
Update your lambda configuration to add environment variables as key-value pairs, then read and use them in your python function to process data and interact with aws resources.
Learn to read environment variables in a Python lambda using the os library and apply them in function responses, then update and invoke the function to verify.
Publish a lambda function to make it visible to other AWOS services, moving it from unpublished to published, and learn to define versions and aliases, including latest and version numbers.
Create aliases for AWS Lambda function versions to tag environments like production, staging, and development. Invoke the function by its alias and use Python to map aliases to specific versions.
Invoke a production version of an AWS Lambda function using its alias as a qualifier. Decode and print the payload, then leverage aliases and versioning to manage changes.
Learn to fetch a lambda function's configuration using a get_function method in Python with boto3, seeing details like runtime, function name, handler, role, and last modified date.
Discover how AWS Lambda serves as the serverless backbone by packaging and deploying code in Python or other languages, without managing infrastructure.
AWS Lambda is one of the fastest growing services of AWS!
Join me in this course to learn how you can develop and deploy Python, Node.js or Java Lambda functions using Python and Boto3; manage your serverless functions easily!
This course is part of a series of courses on AWS solutions with Python and Boto3 and now it’s time to implement serverless functions!
AWS Lambda is a cornerstone service for serverless architectures on AWS. You do not manage infrastructure like CPU, memory, OS or patches you name it! All you have to do and worry about is your implementation and code!
Let’s take a closer look at what we’re going to cover in this course step-by-step.
In this course, we will start off with what we’ll build throughout the course and what you need to have on your computer to follow along with me.
Don’t worry; I’ll explain everything you need very clearly and I’ll show you what you need to install and setup on your computer to work with AWS Lambda. There will be two different sections for Windows and MacOS users. These sections are basically identical and show how you can prepare your computer environment to be ready to work with AWS Lambda! I’ll show you how to install Python, Boto3 and configure your environments for these tools. I’ll also show you how you can create your own AWS account step-by-step and you’ll be ready to work AWS in no time!
When we’re done with preparing our environment to work AWS with Python and Boto3, we’ll start implementing our solutions for AWS.
First thing we’ll do is to create an IAM Access Policy for our Lambda Functions to access and communicate with other AWS resources like S3, CloudWatch and so on. Once we have it created, we’ll also create an IAM Role for our Lambda Function to execute and run on AWS on our behalf. And as for the most crucial part of this process, we’ll attach the IAM Policy to IAM Role so we will be complete on permissions and roles to run our Lambda Functions!
Next step is to develop a Python Lambda function from scratch! We’ll develop a Python function with a proper handler and start implementing the way to develop it to AWS. For that purpose - since AWS is looking for bytes of the source code for Lambda functions – we’ll develop a Utility class where we’ll implement the way to package our Lambda Function first as zip file. Once we do that, we’ll then read the bytes of the file and pass that information to our deployer method. Apart from source code, we will also provide our Lambda function a runtime, name and so on.
Once we successfully deploy our Python Lambda function, we’ll check it out on AWS console and verify that its configured as we expect it to be.
Next up is the implementation and deployment of a Node.js Lambda function! We’ll follow the same steps again to implement and create our own Node.js Lambda function and deploy it using our genericly-implemented solution for deployment. Once we’ve done that, we’ll again go to AWS console and verify our Lambda function.
Java Lambda functions are up next! We’ll launch Eclipse IDE - which is basically the easiest way to create and work with Java Lambda functions – and install AWS Toolkit first. Once we have it, we will create our very first Java Lambda function and then we’ll package it as an executable JAR file using Maven. Next thing to do is to deploy our Java Lambda function and once we do that, we’ll go to AWS console and verify it.
Now is time to invoke our Lambda functions and you will see how easy it is to do so! We’ll call our function and parse the response from AWS!
Next up is to manage our Lambda function in various ways and that includes Aliasing, Versioning, using Environment Variables, Updating the Source Code and much more! We’ll also learn all the basic CRUD operations we can do against Lambda functions and you’ll again see how easy those are too!
Let’s not lose any more time and jump right into developing and deploying Lambda functions to AWS Lambda!