Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Basic Example

Minimal shell Lambda function using only the custom runtime layer.

What it demonstrates

  • Shell script as Lambda handler
  • Custom provided.al2023 runtime with the shell bootstrap layer
  • Using built-in curl (no additional layers needed)

Architecture

handler.sh (curl) → runtime layer → Lambda (provided.al2023)

Usage

terraform init
terraform apply

Invoke:

aws lambda invoke --function-name shell-handler /dev/stdout

Handler

run () {
    curl -Ss https://wttr.in/?format=3
}

The runtime layer provides the bootstrap that sources handler.sh and calls the function specified in the handler setting (e.g. handler.run → sources handler.sh, calls run).