Fork me on GitHub
#holy-lambda
<
2021-10-04
>
Benjamin14:10:03

clojure -X:new :template holy-lambda :name com.company/example-lambda :output holy-lambda-example I created the example project. What I do not get is how to produce .holy-lambda/build/latest.zip bb hl:compile makes output.jar also for what are the native-agents-payloads in the example project?

Karol Wójcik15:10:11

You have to run: bb hl:native:executable https://fierycod.github.io/holy-lambda/#/cli Regarding the agent payloads https://fierycod.github.io/holy-lambda/#/native-backend

👀 1
👍 1
Benjamin15:10:17

btw how do I figure out what is wrong when I get

{
  "message": "Internal server error"
}
I'm trying to setup a lambda RestApi
const handler = new lambda.Function(this, "HLCDKExampleLambda", {
      runtime: lambda.Runtime.PROVIDED,
      code: lambda.Code.fromAsset('../lambdas/jira-status/.holy-lambda/build/output.jar'),
      handler: "org.singularity-group.jira-status.core.ExampleLambda",
    });

    const api = new apigateway.RestApi(this, "support-bot-jira-status", {
      restApiName: "Support Bot Jira Status Webhook",
      description: "Send message to discord channels when ticket status changes."
    });

    const SayHelloMethod = new apigateway.LambdaIntegration(handler);

    api.root.addMethod("POST", SayHelloMethod);
    api.root.addMethod("GET", SayHelloMethod);
like this atm edit
code: lambda.Code.fromAsset('../lambdas/jira-status/.holy-lambda/build/latest.zip'),

Karol Wójcik15:10:48

Check the logs.

Karol Wójcik15:10:32

I mean where do you get this message? In local environment or on AWS?

Karol Wójcik15:10:58

If on AWS you should definitely check cloudwatch logs

Karol Wójcik15:10:23

1. Could you also show the source of your Lambda? 2. Was the native compilation successful?

Benjamin15:10:30

Ah now it works with native compile + zip path thanks a lot!! - the err was when I tried to make it a docker lambda. Will check cloudwatch logs just to get to know it more.