I'm trying to create a lambda function in typescri...
# aws
c
I'm trying to create a lambda function in typescript, but I got this error during deployment, which is not quite explanatory.
Copy code
* error creating Lambda Function: ValidationException:
    	status code: 400, request id: 65419587-ddbb-465b-9d57-afb7efb7fcb0
Anyway to get more detailed information?
b
Can you show some code please?
c
Here you go
b
So in your lambda function, you need to specify the handler property:
Copy code
const ruleReportsFunc = new aws.lambda.Function("ruleReportsFunc", {
    environment: {
       variables: {
          "RULE_REPORT_BUCKET": ruleReports.bucket,
       },
    },
    code: new pulumi.asset.AssetArchive({
       ".": new pulumi.asset.FileArchive("./app"),
    }),
    runtime: "nodejs12.x",
    role: ruleReportsFuncRole.arn,
    handler: "ruleReportsFunc.ruleReportsFunc" // <-- I think this is correct, but you'll need to check
 });
but I'll create a ticket as that's not a very useful error message
👍 1
c
thanks a lot!