{"id":50897353,"url":"https://github.com/ql4b/lambda-shell-layers","last_synced_at":"2026-06-16T01:04:04.928Z","repository":{"id":307470261,"uuid":"1028472447","full_name":"ql4b/lambda-shell-layers","owner":"ql4b","description":"Lambda layers with CLI tools and utilities for shell runtime functions. Pre-built binaries for qrencode, htmlq, imagemagick, and more.","archived":false,"fork":false,"pushed_at":"2026-06-10T09:00:11.000Z","size":586,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T10:23:05.841Z","etag":null,"topics":["aws-lambda","aws-lambda-layer","aws-lambda-runtime","bash","serverless"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ql4b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-29T15:22:22.000Z","updated_at":"2026-06-10T08:59:30.000Z","dependencies_parsed_at":"2025-08-02T01:46:08.045Z","dependency_job_id":null,"html_url":"https://github.com/ql4b/lambda-shell-layers","commit_stats":null,"previous_names":["ql4b/lambda-shell-layers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ql4b/lambda-shell-layers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ql4b%2Flambda-shell-layers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ql4b%2Flambda-shell-layers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ql4b%2Flambda-shell-layers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ql4b%2Flambda-shell-layers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ql4b","download_url":"https://codeload.github.com/ql4b/lambda-shell-layers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ql4b%2Flambda-shell-layers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34386323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-lambda","aws-lambda-layer","aws-lambda-runtime","bash","serverless"],"created_at":"2026-06-16T01:04:04.342Z","updated_at":"2026-06-16T01:04:04.922Z","avatar_url":"https://github.com/ql4b.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lambda-shell-layers\n\n\u003e Lambda layers for shell runtime tools and utilities\n\nPre-built Lambda layers containing common CLI tools and utilities for use with [terraform-aws-lambda-shell-runtime-layer](https://github.com/ql4b/terraform-aws-lambda-shell-runtime-layer). Each layer provides statically-linked binaries optimized for AWS Lambda.\n\n## Available Layers\n\n- **jq** - Command-line JSON processor\n- **qrencode** - QR code generation from command line\n- **htmlq** - HTML parsing and extraction tool\n- **yq** - YAML/XML/JSON processing tool\n- **http-cli** - Minimal HTTP client for shell scripts\n- **pcre2grep** - Perl-compatible regex pattern matching\n- **uuid** - UUID generation utility\n\n## Quick Start\n\n### Using GitHub Release Artifacts\n\nEach release publishes architecture-specific zips:\n\n```\njq-arm64-layer.zip\njq-x86_64-layer.zip\nhtmlq-arm64-layer.zip\n...\n```\n\nDownload from [Releases](https://github.com/ql4b/lambda-shell-layers/releases) and use with Terraform `source_url` or upload directly to AWS.\n\n### Building Your Own\n\n```bash\n# Build specific layer\ncd jq \u0026\u0026 ./build.sh\n\n# Build all layers\n./scripts/build-all.sh\n\n# Build for specific architecture\nARCH=x86_64 ./scripts/build-all.sh\n```\n\n## Layer Zip Structure\n\nAll layer zips contain paths relative to `/opt`:\n\n```\nbin/              # Executable binaries\nlib/              # Shared libraries (if needed)\n```\n\nAWS Lambda extracts layer zips into `/opt`, so binaries end up at `/opt/bin/\u003ctool\u003e` and are available in PATH.\n\n## Usage Examples\n\n### QR Code Generation\n\n```bash\n# In your Lambda function\napi_handler() {\n    local text=\"$1\"\n    qrencode -o /tmp/qr.png \"$text\"\n    echo \"QR code generated at /tmp/qr.png\"\n}\n```\n\n### HTML Parsing\n\n```bash\n# Extract data from HTML\napi_handler() {\n    local html=\"$1\"\n    echo \"$html\" | htmlq '.title' --text\n}\n```\n\n### HTTP Requests\n\n```bash\n# Make HTTP requests\napi_handler() {\n    local response=$(http-cli --header \"Content-Type: application/json\" https://api.example.com)\n    echo \"$response\" | jq '.data'\n}\n```\n\n### Pattern Matching\n\n```bash\n# Find patterns in text\napi_handler() {\n    local text=\"$1\"\n    echo \"$text\" | pcre2grep -o \"[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}\" --ignore-case\n}\n```\n\n### Generate UUIDs\n\n```bash\n# Generate a UUID\napi_handler() {\n    local uuid=$(uuidgen)\n    echo \"Generated UUID: $uuid\"\n}\n```\n\n## Building Layers\n\nEach layer includes:\n\n- **Dockerfile** - Multi-stage build for static binaries\n- **build.sh** - Build and package script\n- **README.md** - Usage documentation\n\n### Build Requirements\n\n- Docker\n- AWS CLI (for deployment)\n- zip utility\n\n## Integration with Terraform\n\nUsing [terraform-aws-lambda-layer](https://github.com/ql4b/terraform-aws-lambda-layer) and [terraform-aws-lambda-shell-runtime-layer](https://github.com/ql4b/terraform-aws-lambda-shell-runtime-layer) modules:\n\n```hcl\n# Shell runtime (required)\nmodule \"runtime\" {\n  source = \"git::https://github.com/ql4b/terraform-aws-lambda-shell-runtime-layer.git?ref=v1.0.0\"\n\n  name         = \"shell-runtime\"\n  architecture = \"arm64\"\n}\n\n# From GitHub Release (recommended)\nmodule \"jq\" {\n  source = \"git::https://github.com/ql4b/terraform-aws-lambda-layer.git?ref=v1.2.0\"\n\n  name       = \"jq\"\n  source_url = \"https://github.com/ql4b/lambda-shell-layers/releases/download/v0.0.3/jq-arm64-layer.zip\"\n}\n\n# From local source directory\nmodule \"jq\" {\n  source = \"git::https://github.com/ql4b/terraform-aws-lambda-layer.git?ref=v1.2.0\"\n\n  name       = \"jq\"\n  source_dir = \"path/to/lambda-shell-layers/jq/layer/opt\"\n}\n\n# Use in function\nmodule \"handler\" {\n  source = \"git::https://github.com/ql4b/terraform-aws-lambda-function.git?ref=v1.1.0\"\n\n  name         = \"my-function\"\n  runtime      = \"provided.al2023\"\n  handler      = \"handler.run\"\n  architecture = \"arm64\"\n\n  layers = [\n    module.runtime.layer_arn,\n    module.jq.layer_arn\n  ]\n}\n```\n\n## Releases\n\nPushing to `main` triggers the GitHub Actions workflow which:\n\n1. Builds all layers for both `arm64` and `x86_64`\n2. Determines the next version from commit messages using [semantic-release](https://github.com/semantic-release/semantic-release)\n3. Publishes architecture-specific zips as release assets\n\nVersion is determined automatically from [Conventional Commits](https://www.conventionalcommits.org/):\n- `fix:` → patch release (e.g. `v1.0.1`)\n- `feat:` → minor release (e.g. `v1.1.0`)\n- `feat!:` / `BREAKING CHANGE:` → major release (e.g. `v2.0.0`)\n\n## Contributing\n\nTo add a new layer:\n\n1. Create directory with layer name\n2. Add Dockerfile with multi-stage build (binaries go to `/opt/bin`)\n3. Create `build.sh` — zip from `layer/opt/` so paths are relative to `/opt`\n4. Add README.md with usage examples\n5. Test with lambda-shell-runtime\n\n## Layer Compatibility\n\n- **Runtime**: `provided.al2023`\n- **Architecture**: `arm64`, `x86_64`\n- **Compatible with**: [terraform-aws-lambda-shell-runtime-layer](https://github.com/ql4b/terraform-aws-lambda-shell-runtime-layer)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fql4b%2Flambda-shell-layers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fql4b%2Flambda-shell-layers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fql4b%2Flambda-shell-layers/lists"}