Using the AWS CLI to Create an AWS Lambda Function

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

This hands-on lab provides experience with creating and customizing Lambda functions, all from within the CLI. The primary focus will be on Lambda, AWS CLI, and CloudWatch log streams. AWS Lambda allows you to create functions and only have to worry about managing your code. Using the CLI allows you to “ditch the clicks” — all those mouse gestures required when you create a function within the console.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create a Lambda Function Using the AWS CLI

Create your Lambda function with the AWS CLI and verify it exists using the console:

  • SSH into the provided instance.
  • Create a local zip file containing the Node.js code.
  • Run the AWS CLI Lambda command to create a function (using the zipped file).
  • Update the configuration settings for the function (256 MB, 5 Sec Timeout).
  • Verify that the function shows within AWS.
Invoke Your Function Using AWS CLI

Using the AWS CLI, invoke the function you just created:

  • Use the AWS CLI Lambda command to invoke the function you created.
  • Verify it was invoked using the monitoring section of the AWS Lambda console.
  • Check the CloudWatch Logs for the proper logging.

Additional Resources

Log in to the live AWS environment using the credentials provided.

Please make sure you are in the us-east-1 (N. Virginia) region before beginning.

Note: All code used in the lesson is available to download on GitHub. You do not need to rewrite it.

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?