{"id":19007009,"url":"https://github.com/yowainwright/build-lambda-layer","last_synced_at":"2025-04-22T19:24:34.530Z","repository":{"id":58558018,"uuid":"527134775","full_name":"yowainwright/build-lambda-layer","owner":"yowainwright","description":"Build awesome node lambda layers with control 🕹","archived":false,"fork":false,"pushed_at":"2025-04-07T05:00:51.000Z","size":1201,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T21:05:01.003Z","etag":null,"topics":["aws","aws-lambda","lambda","lambda-layers","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yowainwright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-21T07:22:35.000Z","updated_at":"2025-04-07T05:00:52.000Z","dependencies_parsed_at":"2023-11-06T06:21:58.603Z","dependency_job_id":"dbdbc5ac-45d0-46d8-9f41-82991e877100","html_url":"https://github.com/yowainwright/build-lambda-layer","commit_stats":{"total_commits":119,"total_committers":3,"mean_commits":"39.666666666666664","dds":"0.33613445378151263","last_synced_commit":"4d18b42d5ecf5c90c6228b64483aa32c7fa9d2c0"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fbuild-lambda-layer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fbuild-lambda-layer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fbuild-lambda-layer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yowainwright%2Fbuild-lambda-layer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yowainwright","download_url":"https://codeload.github.com/yowainwright/build-lambda-layer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250307128,"owners_count":21409037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","aws-lambda","lambda","lambda-layers","nodejs"],"created_at":"2024-11-08T18:35:43.394Z","updated_at":"2025-04-22T19:24:34.509Z","avatar_url":"https://github.com/yowainwright.png","language":"TypeScript","readme":"# Build Lambda Layer\n\n![Typed with TypeScript](https://flat.badgen.net/badge/icon/Typed?icon=typescript\u0026label\u0026labelColor=blue\u0026color=555555)\n![ci](https://github.com/yowainwright/build-lambda-layer/actions/workflows/ci.yml/badge.svg)\n[![npm](https://img.shields.io/npm/v/build-lambda-layer)](https://www.npmjs.com/package/build-lambda-layer)\n[![Github](https://badgen.net/badge/icon/github?icon=github\u0026label\u0026color=black)](https://github.com/yowainwright/build-lambda-layer)\n\n### Builds Awesome Node Lambda Layers with Control! 🕹\n\n_Build Lambda Layer_ is a utility CLI for building AWS Lambda Layers with control for AWS Node Lambda projects.\n\n---\n\n## Why is this written?\n\n_Build Lambda Layer takes complexity out of building lambda layers!_\n\n---\n\n\\+ Monorepo support\u003cbr\u003e\n\\+ The ability to ignore and add dependencies at run time\u003cbr\u003e\n\\+ Easy json configuration!\n\n---\n\n## How does it does it work?\n\nBy running:\n\n```sh\nbuild-layer \u003cyour-lambda-layer\u003e\n```\n\n_Build Lambda Layer_ will:\n\n- install all `package.json` dependencies to `\u003cyour-lambda-layer\u003e`, and\n- zip it up to be uploaded to AWS 🚀\n\n---\n\n#### Additionally, _Build Lambda Layer_ works with monorepos!\n\nA key additional feature that Build Lambda Layer provides is that it works with monorepos!\n\nBy running:\n\n```sh\nbuild-layer my-lambda-layer --files 'packages/**/package.json'\n```\n\n_Build Lambda Layer_ will:\n\n- install all `package/**/package.json` dependencies to your lambda layer, and\n- zip it up to be uploaded to AWS\n\n---\n\n#### Ignore and include the dependencies you want!\n\n_Build Lambda Layer_ supports specificity with `ignore` and `include` options.\n\nBy adding a `\"lambdaLayer\"` object to a `package.json` file you're building from, you can specify packages to `ignore` and `include`:\n\n```json\n{\n  \"buildLambda\": {\n    \"ignore\": [\"@types/aws-lambda\"],\n    \"include\": {\n      \"aws-lambda\": \"latest\"\n    }\n  }\n}\n```\n\nYou can also add a `lambdaLayerrc` file to your project root if you want to preserve your `package.json` file.\n\n```json\n{\n  \"ignore\": [\"@types/aws-lambda\"],\n  \"include\": {\n    \"aws-lambda\": \"latest\"\n  }\n}\n```\n\n---\n\n#### Be _really_ selective with your installs\n\nThere is nothing stopping you from creating your own dependency object to install.\n\nAdd a `\u003cyour-dependencies\u003e.json` file to your project root:\n\n```json\n{\n  \"dependencies\": {\n    \"aws-lambda\": \"latest\"\n  }\n}\n```\n\nAnd run:\n\n```sh\nbuild-layer my-lambda-layer --files '\u003cyour-dependencies\u003e.json'\n```\n\n---\n\nThat's it! 🎉\n\nSave yourself the time and effort of building Lambda Layers and let _Build Lambda Layer_ do it for you!\n\n---\n\n### Install\n\n```sh\npnpm install build-lambda-layer\n```\n\n---\n\n### CLI API\n\n```sh\nUsage: build-layer [options] \u003cdir\u003e\n\nBuild Lambda Layer, Build node awesome lambda layers with controls 🕹\n\nArguments:\n  dir                                 lambda layer directory to build to\n\nOptions:\n  --architectures [architectures...]  architectures for deployment to AWS\n  --bucket \u003cbucket\u003e                   bucket to deploy to using AWS\n  -c, --config \u003cconfig\u003e               path to a config file\n  --deploy                            deploy your lambda layer\n  -n, --name \u003cname\u003e                   lambda layer name\n  --debug                             enable debugging\n  -f, --files [files...]              file glob pattern\n  -i, --ignore [ignore...]            ignore glob pattern\n  --isTesting                         enable running fn tests w/o overwriting\n  --noZip                             don't zip lambda layer\n  -o, --output \u003coutput\u003e               output path\n  -r, --rootDir \u003crootDir\u003e             root directory to start search\n  --runner \u003crunner\u003e                   npm, pnpm, or yarn\n  --runtimes [runtimes...]            runtimes for deployment to AWS\n  -t, --isTestingCLI                  enable CLI only testing\n  -h, --help                          display help for command\n```\n\n---\n\n## Recipes\n\n##### Debugging\n\nGets you logging in your terminal\n\n```sh\nbuild-layer \u003cdir\u003e --debug\n```\n\n##### No Zip\n\nJust build you a directory\n\n```sh\nbuild-layer \u003cdir\u003e --noZip\n```\n\n##### Custom runner\n\nBuild everything with a runner besides `npm`. Options are `npm`, `pnpm`, or `yarn`\n\n```sh\nbuild-layer \u003cdir\u003e --runner 'pnpm'\n```\n\n##### AWS Deploy\n\nAssumes you're authenticated, have the AWS CLI, and have already deployed the layer to S3.\nAKA, implemented but not actively guaranteed to work!\n\n```\nbuild-layer \u003cdir\u003e --bucket \u003cbucket\u003e --runtimes [runtimes...] --architectures [architectures...]\n```\n\n---\n\nMade by [@yowainwright](https://github.com/yowainwright) for fun with passion! MIT, 2022\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyowainwright%2Fbuild-lambda-layer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyowainwright%2Fbuild-lambda-layer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyowainwright%2Fbuild-lambda-layer/lists"}