sparse-intern-71089
11/21/2022, 2:38 PMalert-gpu-18471
11/21/2022, 2:40 PMconst ogimGlueCrawler = new aws.glue.Crawler("ogim-report-crawler", {
databaseName: glueCatalogDatabase.name,
role: monitoringRoleArn,
s3Targets: [{
path: pulumi.interpolate`s3://${bucketName}/ogim`,
}],
});
const pythonLambda = new aws.lambda.Function("python-lambda-function", {
code: new pulumi.asset.AssetArchive({
".": new pulumi.asset.FileArchive("./lambda"),
}),
runtime: aws.lambda.Python3d8Runtime,
timeout: 30,
handler: "handler.glue_handler",
role: lambdaRole.arn
});
const glueLambdaInvocation = new aws.lambda.Invocation("python-lambada-invocation", {
functionName: pulumi.interpolate`${pythonLambda.name}`,
input: JSON.stringify({
crawler_name: pulumi.interpolate`${ogimGlueCrawler.name}`,
dummy_number: Math.floor(Math.random() * 1000), // To force lambda to run
}),
});
alert-gpu-18471
11/21/2022, 2:41 PMlittle-cartoon-10569
11/21/2022, 6:43 PMinput
. You can't set input
to be a string, then embed an output into the string. That will just call toString()
on the output, which isn't what you want.little-cartoon-10569
11/21/2022, 6:45 PMapply
originGlueCrawler.name, and build the JSON string in there. That way, the output will contain JSON, input
can decide outputs, and the JSON gets correctly put into the payload.alert-gpu-18471
11/22/2022, 3:20 AM