Creating a Lambda Function Using the AWS Console

Get Started
45 minutes
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab scenario, you’ll write a Node.js Lambda function that checks a URL (like _www.amazon.com_) and returns the status code that signifies if the website is up and running or down. During this lab, you’ll have the opportunity to explore the Lambda console, function code, execution roles, test events, and execution results. AWS Lambda allows you to write concise functions and only worry about your code. Since Lambda is serverless, AWS manages the underlying infrastructure for you.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Author Node.js Lambda Function in AWS Console
  1. Navigate to Lambda.
  2. Click Create function.
  3. Select Author from scratch.
  4. Name your function.
  5. Select Node.js as the runtime.
  6. Select Create a new role with basic Lambda permissions.
  7. Click Create function.
  8. In a new browser tab, navigate to the lab GitHub repository link provided on the lab page.
  9. Copy the index.js code, and replace the Lambda function code with it.
  10. Deploy your function.
Test Function Using a Test Event
  1. Click the Test button on the Lambda function dashboard.
  2. Leave the default values, and click Create.
  3. Click the Test button.
  4. Review the output response.
View Lambda’s CloudWatch Logs
  1. Click on the Monitoring tab.
  2. Click View logs in CloudWatch.
  3. Click on the most recent log stream in the Log streams section.
  4. Notice the billed duration.

Additional Resources

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


Note: You do not need to rewrite all of the code used in the lesson — it is available for download.

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.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!
Thanks for reaching out!

You’ll hear from us shortly. In the meantime, why not check out what our customers have to say about ACG?