{"id":17717761,"url":"https://github.com/mununki/lambda-warmer","last_synced_at":"2025-03-31T12:26:12.177Z","repository":{"id":143922206,"uuid":"180810347","full_name":"mununki/lambda-warmer","owner":"mununki","description":"A lambda function to warm another lambda function","archived":false,"fork":false,"pushed_at":"2019-04-11T14:45:25.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T03:22:04.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mununki.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}},"created_at":"2019-04-11T14:31:42.000Z","updated_at":"2024-04-24T03:22:04.507Z","dependencies_parsed_at":"2023-06-03T11:31:18.548Z","dependency_job_id":null,"html_url":"https://github.com/mununki/lambda-warmer","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/mununki%2Flambda-warmer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2Flambda-warmer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2Flambda-warmer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mununki%2Flambda-warmer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mununki","download_url":"https://codeload.github.com/mununki/lambda-warmer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246467188,"owners_count":20782274,"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":"2024-10-25T14:29:58.319Z","updated_at":"2025-03-31T12:26:12.157Z","avatar_url":"https://github.com/mununki.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lambda Warmer\n\n_The related post: https://moondaddi.dev/post/2019-03-23-how-to-warm-lambda-function/_\n\nThis is a lambda function to warm another lambda function in AWS. Especially, this is to solve a cold start issue for **the web app which is deployed on AWS lambda.**\n\n## Usage\n\n### Requirements\n\n- [serverless](https://serverless.com/) is required.\n\n### Deployment\n\n- Clone this repo.\n\n```shell\n$ git clone https://github.com/mattdamon108/lambda-warmer.git\n```\n\n- Rename `serverless.template.yml` to `serverless.yml` and configure it with your IAM profile.\n\n```shell\n$ mv serverless.template.yml serverless.yml\n```\n\n```yml\nservice: lambda-warmer\n\nprovider:\n  name: aws\n  runtime: nodejs8.10\n  stage: dev\n  region: ap-northeast-2 # Edit the region\n  profile: your-profile # Edit here with your AWS IAM profile\n  memorySize: 128\n  timeout: 15s\n\nfunctions:\n  warmer:\n    handler: handler.warmer\n    events:\n      - schedule: rate(5 minutes)\n```\n\n\u003e Your IAM profile needs to be stored in `~/.aws/credentials` with proper permissions to create a lambda function through AWS cloudformation.\n\n- Set the target URL\n\n```js\n// handler.js\n\nmodule.exports.warmer = async (event, context, callback) =\u003e {\n  try {\n    await warming(\"https://www.rate-link.com/rates\"); // change your target URL\n    context.succeed();\n  } catch (e) {\n    context.done();\n  }\n};\n```\n\n- Deploy\n\n```shell\n$ sls deploy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmununki%2Flambda-warmer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmununki%2Flambda-warmer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmununki%2Flambda-warmer/lists"}