{"id":23578342,"url":"https://github.com/buildbreakdo/lambda-starter","last_synced_at":"2025-11-08T22:02:58.606Z","repository":{"id":39693942,"uuid":"125077114","full_name":"buildbreakdo/lambda-starter","owner":"buildbreakdo","description":"AWS Lambda Starter Kit with latest Babel 7, Jest 24 and Webpack 4.","archived":false,"fork":false,"pushed_at":"2023-01-03T18:20:58.000Z","size":2383,"stargazers_count":26,"open_issues_count":17,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T00:51:14.767Z","etag":null,"topics":["api-gateway","aws","aws-lambda","babel","sam-local","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/buildbreakdo.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}},"created_at":"2018-03-13T15:55:06.000Z","updated_at":"2022-11-11T02:33:45.000Z","dependencies_parsed_at":"2023-02-01T08:45:52.831Z","dependency_job_id":null,"html_url":"https://github.com/buildbreakdo/lambda-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildbreakdo%2Flambda-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildbreakdo%2Flambda-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildbreakdo%2Flambda-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildbreakdo%2Flambda-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildbreakdo","download_url":"https://codeload.github.com/buildbreakdo/lambda-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252596365,"owners_count":21773843,"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":["api-gateway","aws","aws-lambda","babel","sam-local","webpack"],"created_at":"2024-12-26T22:38:58.248Z","updated_at":"2025-11-08T22:02:58.534Z","avatar_url":"https://github.com/buildbreakdo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## \u003cimg height=\"30\" title=\"AWS\" src=\"https://raw.githubusercontent.com/github/explore/fbceb94436312b6dacde68d122a5b9c7d11f9524/topics/aws/aws.png\" /\u003e Lambda Starter Kit \u003cimg align=\"right\" title=\"Maintenance Status\" src=\"https://img.shields.io/badge/status-maintained-brightgreen.svg?style=flat-square\" /\u003e\n- \u003cimg width=\"40\" title=\"Babel\" src=\"https://raw.githubusercontent.com/babel/logo/master/babel.png\" /\u003e to enable the latest JavaScript ES6 language features and simplification of code with the class syntax\n- \u003cimg width=\"40\" title=\"Webpack\" src=\"https://camo.githubusercontent.com/d18f4a7a64244f703efcb322bf298dcb4ca38856/68747470733a2f2f7765627061636b2e6a732e6f72672f6173736574732f69636f6e2d7371756172652d6269672e737667\" /\u003e Webpack to bundle only production dependencies to a single file, watch for changes and eliminate dead code\n- \u003cimg width=\"40\" title=\"AWS Sam Local\" src=\"https://github.com/buildbreakdo/aws-sam-local/blob/develop/media/sam-local-banner.png\" /\u003e AWS Sam Local to emulate API Gateway locally so you can test your Lambda functions without deploying to AWS\n- \u003cimg width=\"40\" title=\"AWS Sam Local\" src=\"https://github.com/buildbreakdo/jest/raw/master/website/static/img/jest-readme-headline.png\" /\u003e Jest to test and confirm code works during development and before deploying to production\n\n## Installation\n```\ncd YourLambdaFunctionDirectory\ngit clone git@github.com:buildbreakdo/aws-api-lambda.git .\nnpm install\n```\n\n## Create\nTo ensure correct assignment of IAM, role and permissions the recomendation is to initialize the lambda function manually on AWS.\n\n1) [Create a Lambda Function using the AWS Console](https://docs.aws.amazon.com/lambda/latest/dg/getting-started-create-function.html)\n2) Update function-name in `package.json` with the name of the function you just created:\n```\n// package.json\n...\n  \"scripts\": {\n    ...\n    \"update\": \"aws lambda update-function-code --function-name MyNewLambdaFunctionName --zip-file fileb://dist.zip --publish\",\n    ...\n  }\n...\n```\n3) [Install `aws-cli`](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html)\n4) `npm run deploy` to build, run tests and update your function to the latest code\n\n## Run Scripts\n\n### Build\nUse webpack to build/index.js:\n\n`npm run build`\n\n### Deploy\nBuild, execute tests in continuous integration mode (bail on failure) and update your Lambda function with the latest code:\n\n`npm run deploy`\n\n### Test\n##### Run jest tests:\n\n`npm run test`\n\n##### Run jest tests in continuous integration mode (hard exit on test failure):\n\n`npm run test:ci`\n\n##### Run Jest tests continuously and watch for changes:\n\n`npm run test:watch`\n\n##### Debug Jest tests with Chrome browser:\n\n1) Insert `debugger` on a line in your test\n2) `npm run test:debug`\n3) Open Chrome and navigate to about:inspect\n\n### Watch\nMonitor `src` folder for changes and rebuild when changes occur.\n\n`npm run watch`\n\n### Start\nUsed to be the case that we had to deploy a lambda function to test what would actually happen in a production environment. This is no longer the case, now we can emulate API Gateway and AWS Lambda locally using the [AWS-SAM-CLI](https://github.com/awslabs/aws-sam-cli) from Amazon. The `template.yml` file in the root of the repository is the configuration used by SAM Local (points to code in `build/index.js`).\n\nLocal Development Prerequisites. Running functions locally with SAM Local requires Docker to be installed and running.\n\n - macOS: [Docker for Mac](https://store.docker.com/editions/community/docker-ce-desktop-mac)\n - Windows: [Docker Toolbox](https://download.docker.com/win/stable/DockerToolbox.exe)\n - Linux: Check your distro’s package manager (e.g. yum install docker)\n\n```\nnpm install -g aws-sam-local\nnpm start\n```\n\nStarts the AWS SAM Local development server on `http://127.0.0.1:3000`. Open `http://127.0.0.1:3000` in your browser to execute your Lambda function.\n\n`Note: You only need to restart SAM CLI if you update your AWS SAM template.`\n\nSAM Local will watch your `build` directory for changes and reload when changes\noccur. Be sure to run `npm run watch` to monitor your `src` directory (where you will be writing code) to ensure SAM Local\nalways has the latest `build/index.js`. Happy coding!\n\n#### License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildbreakdo%2Flambda-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildbreakdo%2Flambda-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildbreakdo%2Flambda-starter/lists"}