{"id":28210572,"url":"https://github.com/bkosm/aws-lambda-layer-maker","last_synced_at":"2025-06-25T03:03:34.051Z","repository":{"id":289706750,"uuid":"972119954","full_name":"bkosm/aws-lambda-layer-maker","owner":"bkosm","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-16T10:02:58.000Z","size":23,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-11T00:43:19.372Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bkosm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-24T15:07:09.000Z","updated_at":"2025-05-16T10:03:02.000Z","dependencies_parsed_at":"2025-04-24T17:23:15.025Z","dependency_job_id":"9dafb6fc-fb94-4d64-b835-f7e52204d4e9","html_url":"https://github.com/bkosm/aws-lambda-layer-maker","commit_stats":null,"previous_names":["bkosm/aws-lambda-layer-maker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bkosm/aws-lambda-layer-maker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkosm%2Faws-lambda-layer-maker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkosm%2Faws-lambda-layer-maker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkosm%2Faws-lambda-layer-maker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkosm%2Faws-lambda-layer-maker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bkosm","download_url":"https://codeload.github.com/bkosm/aws-lambda-layer-maker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bkosm%2Faws-lambda-layer-maker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261795286,"owners_count":23210614,"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":[],"created_at":"2025-05-17T17:10:15.333Z","updated_at":"2025-06-25T03:03:34.033Z","avatar_url":"https://github.com/bkosm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda Layer Maker 🛠️\n\nA fast and efficient CLI tool for creating AWS Lambda layers using Docker.\n\n## Prerequisites 📋\n\n- [Bun](https://bun.sh) installed\n- Docker installed and running\n- `zip` command available in your system\n- AWS credentials configured (for publishing)\n\n## Installation 💻\n\n```bash\n# Clone the repository\ngit clone https://github.com/bkosm/aws-lambda-layer-maker.git\ncd aws-lambda-layer-maker\n\n# Install dependencies\nbun install\n```\n\n## Usage 🚀\n\n### Quick Start - Direct Publishing\n\nCreate and publish a layer directly to AWS Lambda in two commands:\n\n```bash\n# 1. Create the layer\nbun run make -r python3.12 -f requirements.txt\n\n# 2. Publish directly to Lambda\nbun run publish\n# -\u003e Select \"Local file\" when prompted\n# -\u003e Follow the prompts to name and configure your layer\n```\n\n**Note**: Direct publishing only works for layers under 50MB. For larger layers, you must use the S3 flow described below.\n\n### Advanced Usage - S3 Storage\n\nCreate, store in S3, and publish a layer in three commands. This flow is required for layers over 50MB due to AWS Lambda API limitations:\n\n```bash\n# 1. Create the layer\nbun run make -r python3.12amd64 -f requirements.txt\n\n# 2. Upload to S3\nbun run put-s3-object\n# -\u003e Follow the prompts to specify bucket and path\n# Example output:\n# Upload completed successfully!\n# S3 Location: s3://my-bucket/lambda-layers/python3-12-layer-2024-03-28.zip\n\n# 3. Publish from S3 to Lambda\nbun run publish\n# -\u003e Select \"S3 bucket\" when prompted\n# -\u003e The tool will remember your last S3 location\n```\n\n### Layer Creation Options\n\nCreate a Lambda layer from a requirements.txt file:\n\n```bash\n# Using long options\nbun run make --runtime python3.12amd64 --requirements path/to/requirements.txt\n\n# Using short options\nbun run make -r python3.12amd64 -f path/to/requirements.txt\n```\n\nThe tool will:\n1. Create a Docker container with Python 3.12\n2. Install the dependencies from your `requirements.txt`\n3. Package them into a Lambda layer\n4. Validate the layer size against AWS limits\n5. Output a zip file in the `output` directory\n\n### Publishing Options\n\nWhen publishing a layer, you can choose between two sources:\n\n1. **Local File**\n   - Directly uploads the zip file from your machine\n   - Faster for small files (under 50MB)\n   - No additional storage costs\n   - Limited by AWS Lambda API payload size\n\n2. **S3 Bucket**\n   - Uses a previously uploaded zip from S3\n   - Required for files over 50MB\n   - Better for large files\n   - Allows sharing layers between accounts\n   - Provides backup/versioning if needed\n\n### AWS Credentials\n\nBefore running the publish or S3 commands, make sure to set your AWS credentials:\n\n```bash\nexport AWS_ACCESS_KEY_ID=\"your-access-key\"\nexport AWS_SECRET_ACCESS_KEY=\"your-secret-key\"\nexport AWS_SESSION_TOKEN=\"your-session-token\"  # Required for temporary credentials\n```\n\n### Size Limits 📏\n\nBe mindful of AWS Lambda limits:\n- ❌ Error at 50MB for direct publishing (use S3 flow instead)\n- 📝 Maximum unzipped size of the Lambda deployment package has to be under 250MB\n\n## Output 📦\n\nThe generated layer will be in the `output` directory with a name format:\n```\npython3-12-layer-2024-03-15T10-30-45-123Z.zip\n```\n\n## Docker Usage 🐳\n\nThe tool uses official Docker images for each runtime:\n- Python 3.12: `python:3.12-slim`\n\nThis ensures that dependencies are compiled and packaged in an environment matching AWS Lambda.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkosm%2Faws-lambda-layer-maker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbkosm%2Faws-lambda-layer-maker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbkosm%2Faws-lambda-layer-maker/lists"}