1. Introduction

In these labs, we’ll be following the steps presented in some AWS Lambda tutorials available on the Amazon website. The main difference here is that I created some scripts that allow us to execute some steps in a more command-line fluent way.

2. Prerequisites

  1. A copy of the main branch of this Git repository. You can get it by typing the following command in a terminal session:

    $ source <(curl -sSL https://raw.githubusercontent.com/paulojeronimo/aws-lambda-labs/main/download.sh)
  2. Bash version 5 installed.

    If you are using a macOS environment, upgrade your Bash version following these steps or by typing the following commands:

    $ brew upgrade && brew install bash
    $ echo $(brew --prefix)/bin/bash | sudo tee -a /private/etc/shells
  3. aws-cli installed.

  4. jq installed.

  5. A configuration file (config.sh - create it using the file config.sample.sh) defining values for the following variables:

    1. IAM: an IAM user ID (12 digits number).

    2. awsRegion: an AWS region.

The steps presented below were tested in a macOS environment running a Bash terminal session. These were the software versions used:

$ sw_vers
ProductName:    macOS
ProductVersion: 11.2.3
BuildVersion:   20D91


$ aws --version
aws-cli/2.1.30 Python/3.9.2 Darwin/20.3.0 source/x86_64 prompt/off

3. Available labs

3.1. runtime-tutorial

3.1.1. Introduction

In the following, we’ll be trailing the Steps to finish the Tutorial – Publishing a custom runtime.

3.1.2. Steps

The steps that we’ll be following can be shown by running the following command:

$ ./runtime/show-steps.sh | less

We can run each step shown in the output of the command above manually or we can run all at once by typing the following command:

$ ./runtime/perform-steps.sh

To clean up the execution and free up the resources on AWS we need to execute this command:

$ ./runtime/cleanup.sh
Pass the option -f to force the execution if needed.

3.2. lambda-with-kinesis

3.2.1. Introduction

In the following, we’ll be trailing the Steps to finish the Tutorial: Using AWS Lambda with Amazon Kinesis.

3.2.2. Steps

We can use the same scripts available in runtime-tutorial with one single difference: first, we need to export a value to the variable steps with the following command:

$ export steps=lambda-with-kinesis

After running the command above we can execute any of the commands presented in the previous lab.

4. Execution samples