| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Lambda layers for shell runtime tools and utilities
Pre-built Lambda layers containing common CLI tools and utilities for use with terraform-aws-lambda-shell-runtime-layer. Each layer provides statically-linked binaries optimized for AWS Lambda.
Each release publishes architecture-specific zips:
jq-arm64-layer.zip jq-x86_64-layer.zip htmlq-arm64-layer.zip ...
Download from Releases and use with Terraform source_url or upload directly to AWS.
# Build specific layer
cd jq && ./build.sh
# Build all layers
./scripts/build-all.sh
# Build for specific architecture
ARCH=x86_64 ./scripts/build-all.shAll layer zips contain paths relative to /opt:
bin/ # Executable binaries lib/ # Shared libraries (if needed)
AWS Lambda extracts layer zips into /opt, so binaries end up at /opt/bin/<tool> and are available in PATH.
# In your Lambda function
api_handler() {
local text="$1"
qrencode -o /tmp/qr.png "$text"
echo "QR code generated at /tmp/qr.png"
}# Extract data from HTML
api_handler() {
local html="$1"
echo "$html" | htmlq '.title' --text
}# Make HTTP requests
api_handler() {
local response=$(http-cli --header "Content-Type: application/json" https://api.example.com)
echo "$response" | jq '.data'
}# Find patterns in text
api_handler() {
local text="$1"
echo "$text" | pcre2grep -o "[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}" --ignore-case
}# Generate a UUID
api_handler() {
local uuid=$(uuidgen)
echo "Generated UUID: $uuid"
}Each layer includes:
Using terraform-aws-lambda-layer and terraform-aws-lambda-shell-runtime-layer modules:
# Shell runtime (required)
module "runtime" {
source = "git::https://github.com/ql4b/terraform-aws-lambda-shell-runtime-layer.git?ref=v1.0.0"
name = "shell-runtime"
architecture = "arm64"
}
# From GitHub Release (recommended)
module "jq" {
source = "git::https://github.com/ql4b/terraform-aws-lambda-layer.git?ref=v1.2.0"
name = "jq"
source_url = "https://github.com/ql4b/lambda-shell-layers/releases/download/v0.0.3/jq-arm64-layer.zip"
}
# From local source directory
module "jq" {
source = "git::https://github.com/ql4b/terraform-aws-lambda-layer.git?ref=v1.2.0"
name = "jq"
source_dir = "path/to/lambda-shell-layers/jq/layer/opt"
}
# Use in function
module "handler" {
source = "git::https://github.com/ql4b/terraform-aws-lambda-function.git?ref=v1.1.0"
name = "my-function"
runtime = "provided.al2023"
handler = "handler.run"
architecture = "arm64"
layers = [
module.runtime.layer_arn,
module.jq.layer_arn
]
}Pushing to main triggers the GitHub Actions workflow which:
Version is determined automatically from Conventional Commits:
To add a new layer:
| Back | FazBrowse Home | New Git URL |