Support deploying pr-agent on AWS Lambda

This commit is contained in:
Yuval Goldberg
2023-07-18 17:46:42 +03:00
parent 3efe08d619
commit dc67e6a66e
3 changed files with 53 additions and 6 deletions

View File

@ -0,0 +1,18 @@
import logging
from fastapi import FastAPI
from mangum import Mangum
from pr_agent.servers.github_app import router
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
app = FastAPI()
app.include_router(router)
handler = Mangum(app, lifespan="off")
def serverless(event, context):
return handler(event, context)