hands-on lab

Use AWS Lambda Custom Runtimes to Run Bash Commands

Difficulty: Beginner
Duration: Up to 45 minutes
Students: 663
Rating: 4/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

AWS Lambda is the core service for building Serverless applications in AWS. It allows you to create functions that are executed in response to events. You only pay for the time the function is executing. You can monitor functions and attach a wide variety of event triggers. You only have to select the runtime for the function you are creating and then you can start writing your code. The only limitation was that you had to use one of the supported programming languages that AWS provided by default. Well, this is no longer the case. Now you can create Lambda functions written in any kind of language by providing a custom runtime that allows the Lambda function to run code in the language of your choice. In this lab, you will be guided into the creation of a Lambda Layer which will contain the runtime configuration and the creation of a function that executes Bash shell commands.

Lab Objectives

Upon completion of this Lab you will be able to:

  • Create a Lambda layer and deploy the custom runtime the function will run on
  • Create a Lambda function written in Bash associated with the layer
  • Test the Lambda function

Lab Prerequisites

You should be familiar with:

  • Working at the command-line in Linux
  • Basic concepts of AWS Lambda

Updates

August 30th, 2021 - Updated description and overview to improve clarity

April 16th, 2021 - Moved validation checks to the most relevant lab step for more immediate validation feedback

March 9th, 2021, - Update AWS Lambda instructions and screenshots to reflect latest user-interface changes

February 7th, 2021 - Improved the reliability of the lab

January 22nd, 2021 - Updated AWS Lambda lab steps to reflect latest user interface updates

Environment before

Environment after

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
AWS Lambda Layers and Runtimes Overview
Creating an AWS Lambda Layer
Creating the Custom Runtime AWS Lambda Function
Testing the Custom Runtime AWS Lambda Function