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.
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)
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
A configuration file (
config.sh- create it using the file config.sample.sh) defining values for the following variables:
IAM: an IAM user ID (12 digits number).
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 $ echo $BASH_VERSION 5.1.4(1)-release $ aws --version aws-cli/2.1.30 Python/3.9.2 Darwin/20.3.0 source/x86_64 prompt/off
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:
To clean up the execution and free up the resources on AWS we need to execute this command:
Pass the option
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.
2021-03-24 (commit 7b99b2f):