{"id":15018138,"url":"https://github.com/probot/adapter-aws-lambda-serverless","last_synced_at":"2025-05-16T05:00:30.565Z","repository":{"id":39100700,"uuid":"127836080","full_name":"probot/adapter-aws-lambda-serverless","owner":"probot","description":"An extension for running Probot on Lambda","archived":false,"fork":false,"pushed_at":"2025-04-21T03:15:29.000Z","size":1462,"stargazers_count":95,"open_issues_count":12,"forks_count":36,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-13T04:07:56.920Z","etag":null,"topics":["aws-lambda","aws-lambda-node","probot","probot-extension"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/probot.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":"2018-04-03T01:56:53.000Z","updated_at":"2025-04-27T08:16:25.000Z","dependencies_parsed_at":"2024-06-18T17:10:44.761Z","dependency_job_id":"91b8be6f-384c-43b9-b7ae-147e66965b59","html_url":"https://github.com/probot/adapter-aws-lambda-serverless","commit_stats":{"total_commits":114,"total_committers":24,"mean_commits":4.75,"dds":0.7543859649122807,"last_synced_commit":"aa64b4ef89c30918ecbe72a216617465e1768ab4"},"previous_names":["probot/serverless-lambda"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fadapter-aws-lambda-serverless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fadapter-aws-lambda-serverless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fadapter-aws-lambda-serverless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/probot%2Fadapter-aws-lambda-serverless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/probot","download_url":"https://codeload.github.com/probot/adapter-aws-lambda-serverless/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253870868,"owners_count":21976613,"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-lambda","aws-lambda-node","probot","probot-extension"],"created_at":"2024-09-24T19:51:29.916Z","updated_at":"2025-05-16T05:00:30.487Z","avatar_url":"https://github.com/probot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@probot/adapter-aws-lambda-serverless`\n\n\u003e Adapter to run a [Probot](https://probot.github.io/) application function in [AWS Lambda](https://aws.amazon.com/lambda/) using the [Serverless Framework](https://github.com/serverless/serverless)\n\n[![Build Status](https://github.com/probot/adapter-aws-lambda-serverless/workflows/Test/badge.svg)](https://github.com/probot/adapter-aws-lambda-serverless/actions)\n\n## Usage\n\n```shell\nnpm install @probot/adapter-aws-lambda-serverless\n```\n\n```javascript\n// handler.js\nconst {\n  createLambdaFunction,\n  createProbot,\n} = require(\"@probot/adapter-aws-lambda-serverless\");\nconst appFn = require(\"./\");\nmodule.exports.lambdaFn = createLambdaFunction(appFn, {\n  probot: createProbot(),\n});\n```\n\n## Configuration\n\nYou need to add [environment variables to configure Probot](https://probot.github.io/docs/configuration/) to your Lambda function. If you use the [Serverless App](https://app.serverless.com/), you can add parameters for `APP_ID`, `PRIVATE_KEY`, `WEBHOOK_SECRET`, the use these parameters in `serverless.yaml`.\n\n```yml\nprovider:\n  name: aws\n  runtime: nodejs12.x\n  lambdaHashingVersion: 20201221\n  environment:\n    APP_ID: ${param:APP_ID}\n    PRIVATE_KEY: ${param:PRIVATE_KEY}\n    WEBHOOK_SECRET: ${param:WEBHOOK_SECRET}\n    NODE_ENV: production\n    LOG_LEVEL: debug\n\nfunctions:\n  probot:\n    handler: handler.lambdaFn\n    events:\n      - httpApi:\n          path: /api/github/webhooks\n          method: post\n```\n\nMake sure to configure your GitHub App registration's webhook URL to `\u003cyour lambda's URL\u003e/api/github/webhooks`.\n\n## Test deployment\n\nFor testing your Probot deployment without end to end (GitHub) integration, you can use this shell snippet:\n\n```shell\n$ LAMBDA_URL=https://x.execute-api.y.amazonaws.com/stage-or-basePath/api/github/webhooks\n$ SECRET=the_webhook_secret\n$ TMP_DATA_FILE=/tmp/smoke.data\n\n$ echo -n \"{\\\"action\\\":\\\"test\\\"}\" \u003e $TMP_DATA_FILE\n$ SIGN=$(openssl dgst -sha1 -hmac $SECRET $TMP_DATA_FILE | cut -d\" \" -f2)\n$ curl --request POST --header \"X-Hub-Signature: sha1=$SIGN\" --header \"X-Github-Event: test\" --header \"X-GitHub-Delivery: fake\" --data-binary \"@$TMP_DATA_FILE\" $LAMBDA_URL\n{\"ok\":true}        \u003c-- Concent for Probot v10: {\"message\":\"Received test.test\"}\n```\n\n## Examples\n\n- [example-aws-lambda-serverless](https://github.com/probot/example-aws-lambda-serverless/#readme) - Official example application that is continuously deployed to AWS Lambda\n\nAdd yours!\n\n## Common errors\n\n| Http Code | Message                      | Description                                                                                        |\n| --------- | ---------------------------- | -------------------------------------------------------------------------------------------------- |\n| 403       | Missing Authentication Token | Bad endpoint (this one is not binded on Lambda)                                                    |\n| 500       | Internal server error        | Incorrect headers value (`X-GitHub-Delivery`, `X-GitHub-Event`, `X-Hub-Signature`) or Probot error |\n\n## Probot v11 migration key points\n\nFor Probot v11 support, this adapter introduces significant changes. Here the key points to update (in addition of [Probot v11 breaking changes](https://github.com/probot/probot/releases/tag/v11.0.0)):\n\n| Key point / Probot   | \u003c= v10                                                                                      | \u003e= v11                                  |\n| -------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------- |\n| NPM package name     | `@probot/serverless-lambda`                                                                 | `@probot/adapter-aws-lambda-serverless` |\n| _handler.js_ content | See [Usage v1.x](https://github.com/probot/adapter-aws-lambda-serverless/tree/v1.0.2#usage) | See [Usage](#usage)                     |\n| AWS Lambda Runtime   | `handler.probot`                                                                            | `handler.webhooks`                      |\n| AWS Lambda Handler   | Node.js 12.x _(preferred)_                                                                  | Node.js 12.x _(required)_               |\n\n## LICENSE\n\n[ISC](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobot%2Fadapter-aws-lambda-serverless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprobot%2Fadapter-aws-lambda-serverless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobot%2Fadapter-aws-lambda-serverless/lists"}