Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy on aws lambda #131

Open
yunho-ju opened this issue Sep 13, 2023 · 4 comments
Open

deploy on aws lambda #131

yunho-ju opened this issue Sep 13, 2023 · 4 comments

Comments

@yunho-ju
Copy link

Hello! First of all, I really like your project.
I have a question: I'm currently trying to deploy it on AWS Lambda. Could you please guide me on how to do that?
Thank you.

@yunho-ju yunho-ju changed the title Self host this source on aws lambda deploy on aws lambda Sep 13, 2023
@anc95
Copy link
Owner

anc95 commented Sep 13, 2023

  1. You should prepare the required env variable in the .env file
  2. yarn build:lambda to build the aws lambda function
  3. use serverless for deploying. (AWS account is required)

@yunho-ju
Copy link
Author

yunho-ju commented Sep 13, 2023

 "errorType": "Runtime.ImportModuleError",
    "errorMessage": "Error: Cannot find module '/var/task/lambda'\nRequire stack:\n- /var/runtime/index.mjs",
    "stack": [
        "Runtime.ImportModuleError: Error: Cannot find module '/var/task/lambda'",
        "Require stack:",
        "- /var/runtime/index.mjs",
        "    at _loadUserApp (file:///var/runtime/index.mjs:1061:17)",
        "    at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1093:21)",
        "    at async start (file:///var/runtime/index.mjs:1256:23)",
        "    at async file:///var/runtime/index.mjs:1262:1"
    ]

after deploy i got above error at aws lambda from cloudwatch log

what did i miss?

@anc95

@yunho-ju
Copy link
Author

I found.

in serverless.yml file
change handler path like below

    handler: lambda/index.webhooks 

@anc95
Copy link
Owner

anc95 commented Sep 13, 2023

@yunho-medi You deployed a webhook. Then you should create a github app with the webhook endpoint configured, then install the app to your repo, and event such as a pull request open / sync happened, would invoke the webhook for reviewing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@anc95 @yunho-ju and others