New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@probot/adapter-aws-lambda-serverless

Package Overview
Dependencies
Maintainers
7
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@probot/adapter-aws-lambda-serverless

An extension for running Probot in AWS Lambda

2.0.0
Source
npm
Version published
Weekly downloads
3.9K
-7.37%
Maintainers
7
Weekly downloads
 
Created
Source

@probot/adapter-aws-lambda-serverless

Adapter to run a Probot application function in AWS Lambda using the Serverless Framework

Build Status

Usage

npm install @probot/adapter-aws-lambda-serverless
// handler.js
const {
  createLambdaFunction,
  createProbot,
} = require("@probot/adapter-aws-lambda-serverless");
const appFn = require("./");
module.exports.webhooks = createLambdaFunction(appFn, {
  probot: createProbot(),
});

Configuration

You need to add environment variables to configure Probot to your Lambda function. If you use the Serverless App, you can add parameters for APP_ID, PRIVATE_KEY, WEBHOOK_SECRET, the use these parameters in serverless.yaml.

provider:
  name: aws
  runtime: nodejs12.x
  lambdaHashingVersion: 20201221
  environment:
    APP_ID: ${param:APP_ID}
    PRIVATE_KEY: ${param:PRIVATE_KEY}
    WEBHOOK_SECRET: ${param:WEBHOOK_SECRET}
    NODE_ENV: production
    LOG_LEVEL: debug

functions:
  webhooks:
    handler: handler.webhooks
    events:
      - httpApi:
          path: /api/github/webhooks
          method: post

Make sure to configure your GitHub App registration's webhook URL to <your lambda's URL>/api/github/webhooks.

Examples

  • example-aws-lambda-serverless - Official example application that is continuously deployed to AWS Lambda

Add yours!

LICENSE

ISC

Keywords

lambda

FAQs

Package last updated on 10 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts