{"id":18402544,"url":"https://github.com/wingkwong/serverless-boilerplate","last_synced_at":"2026-04-30T02:36:22.266Z","repository":{"id":95978121,"uuid":"392524404","full_name":"wingkwong/serverless-boilerplate","owner":"wingkwong","description":"Serverless Boilerplate (APIGW + DynamoDB + Lambda)","archived":false,"fork":false,"pushed_at":"2023-12-15T17:37:32.000Z","size":126,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-16T22:43:44.125Z","etag":null,"topics":["api-gateway","aws","boilerplate","dynamodb","lambda","serverless","serverless-framework"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/wingkwong.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},"funding":{"github":"wingkwong","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-08-04T02:42:33.000Z","updated_at":"2023-04-15T15:20:51.000Z","dependencies_parsed_at":"2024-11-06T03:08:26.452Z","dependency_job_id":null,"html_url":"https://github.com/wingkwong/serverless-boilerplate","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/wingkwong/serverless-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fserverless-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fserverless-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fserverless-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fserverless-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wingkwong","download_url":"https://codeload.github.com/wingkwong/serverless-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fserverless-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32452741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":["api-gateway","aws","boilerplate","dynamodb","lambda","serverless","serverless-framework"],"created_at":"2024-11-06T02:42:47.664Z","updated_at":"2026-04-30T02:36:22.237Z","avatar_url":"https://github.com/wingkwong.png","language":"JavaScript","funding_links":["https://github.com/sponsors/wingkwong"],"categories":[],"sub_categories":[],"readme":"# serverless-boilerplate\nServerless Boilerplate (APIGW + DynamoDB + Lambda)\n\n![image](https://user-images.githubusercontent.com/35857179/128360478-c3496b52-c9ca-4889-b67c-e4359bfb1cd1.png)\n\n## Features\n\n- Common packages for all APIs\n- Define IAM roles pre function\n- Package only dependencies it requires \n- Preload environment variables into Serverless\n- Separate backend resources and APIs\n\n## To-be-provisioned resources\n\n- 1 API Gateway\n\n  ![image](https://user-images.githubusercontent.com/35857179/128449981-b6ae18f4-58b3-4226-a2da-2761a1b2aaed.png)\n\n- 1 DynamoDB with 2 Tables\n  \n  ![image](https://user-images.githubusercontent.com/35857179/128450008-80ee18d8-ff27-4a9e-a105-6af8a2525cea.png)\n\n- 2 Lambda functions\n\n  ![image](https://user-images.githubusercontent.com/35857179/128450790-46b480c5-8968-442f-88d0-d89584c4cc29.png)\n  \n\n## Customize this boilerplate\n\n- By default, this boilerplate uses ``foo`` and ``FOO`` as application name.\n\n- By default, the fallback region is ``ap-southeast-1`` if you don't specify in ``.env``. \n\n## Install\n\n```\nnpm i serverless -g\n```\n\n## Build backend resources (API Gateway + DynamoDB)\n\n```\ncd ./backend\nnpm i\n```\n\n## Deploy backend resources (API Gateway + DynamoDB)\n\n```\ncd ./backend\nsls deploy --stage='dev'\n```\n\n![image](https://user-images.githubusercontent.com/35857179/128448918-a4860889-f8be-4d16-aa81-27cce2b651c6.png)\n\n## Build API\n\n```\ncd api/src\nnpm i\n```\n\n## Deploy API\n\nThere are two Lambda functions. Both will take the input fields (field1 and field2) and write to DynamoDB. The only difference is that api1 is integrated with SES and will send emails to notify specfic users. See [here](https://github.com/wingkwong/serverless-boilerplate/blob/master/api/src/api1/index.js#L72) for more.\n\n```\ncd api/src\nsls deploy --stage='dev'\n```\n\n![image](https://user-images.githubusercontent.com/35857179/128450844-91c800c9-614b-4880-a84f-2ad87410ab3a.png)\n\n## Test API\n\n\u003e If you test api1, make sure your sender has been verified.\n\nHeaders\n```\nContent-Type:application/json\n```\n\nRequest Body\n```\n{\n    \"field1\": \"foo\",\n    \"field2\": \"bar\"\n}\n```\n\nResponse\n\n![image](https://user-images.githubusercontent.com/35857179/128451231-4cd1c015-d888-4fe9-ac88-b643dcf6149c.png)\n\n## Clean up\n\n### Remove API \n\n```\ncd api/src\nsls remove --stage='dev'\n```\n\n### Remove backend resources (API Gateway + DynamoDB) \n\n```\ncd ./backend\nsls remove --stage='dev'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingkwong%2Fserverless-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwingkwong%2Fserverless-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingkwong%2Fserverless-boilerplate/lists"}