Create a Lambda Function Using the AWS Management Console

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you’ll author a Lambda function using the Python programming language in the AWS console. You will also review logs generated by CloudWatch.

**Note:** There have been UI changes to the Lambda console. Please keep this in mind as you are going through this lab.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Author Lambda Function in Python
  • Create a Lambda function from scratch selecting the latest Python version as your runtime.
  • Copy the code from the example Lambda function code.
  • Save and deploy your Python Lambda function after adding the sample code.
Create a Test Event and Execute Lambda
  • Create a test event.
  • Configure the test event using the example JSON test event provided.
Verify That CloudWatch Has Captured Function Logs

View the CloudWatch Logs for the Python Lambda function.

Additional Resources


In this lab scenario, Alfredo's Pizza is a global fast-food chain selling delicious pizza. Their website serves thousands of customers each day and processes over 6 million in payments each week. While Alfredo is doing well, he's not seeing the customers he had hoped for, and relying on expensive, always-on servers ends up with resources sitting idle, wasting money. Alfredo wants to migrate his application to a serverless architecture with the hope of saving on operating costs. We'll help him by showing him how easy Lambda functions can be.

Login Information

  • Log in to the live AWS environment using the provided credentials. Make sure you are in the us-east-1 Region when you work in this environment.

  • Note: There have been UI changes to the Lambda console. Please keep this in mind as you are going through this lab.

Reference Links

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?