Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Creating a Simple AWS Lambda Function

This Learning Activity provides hands-on experience with creating and customizing Python3-based Lambda functions from within the console. The primary focus will be on the following features within AWS Lambda: 1. Lambda Console 2. Function Code 3. Execution Roles 4. Test Events 5. Execution Results AWS Lambda allows you to create functions and you only have to worry about managing your code. AWS handles the underlying infrastructure for you. This *HelloWorld* function will allow you to see just how easy it is to get started.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 30m
Published
Clock icon Aug 03, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Create a Lambda Function within the AWS Lambda Console

    1. Navigate to the Lambda portion of the AWS Console.
    2. Select Create your Lambda Function from scratch.
    3. Select Python3.6 as your runtime.
    4. Copy the code from the example code provided. https://raw.githubusercontent.com/linuxacademy/content-lambda-deep-dive/master/section_2/live_act_1/lambda_function.py
    5. Deploy your function after adding the sample code.
  2. Challenge

    Create a Test Event and Manually Invoke the Function Using the Test Event

    1. Select the drop-down next to Test at the top of the Lambda console.
    2. From the drop-down, select Configure test events.
    3. Select the Hello World event template.
    4. Erase the code in there and copy and paste the provided JSON code, then select Create.
    5. Click on the Test button and verify your function succeeds.
  3. Challenge

    Verify that CloudWatch has Captured Function Logs

    1. Navigate to the CloudWatch portion of the AWS Console.
    2. Select Logs from the selection on the left.
    3. Select the log group with your function name in it.
    4. Select the log stream within the log group.
    5. Verify the output is present and correct.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans