loud-computer-30956
03/05/2019, 7:16 PMlet lambda = new aws.lambda.Function("mylambda", {
runtime: aws.lambda.Python3d6Runtime,
code: new pulumi.asset.AssetArchive({
".": new pulumi.asset.FileArchive(pythonLambdaLocation),
}),
timeout: 300,
handler: lambdaEntryPoint,
role: role.arn,
environment: {
variables: {
"HOOK_URL": HOOK_URL
}
},
}, { dependsOn: [fullAccess] });
// SNS topic and subscription to Lambda
let sns = new aws.sns.Topic("CW_ALARM_PULUMI");
let topicSubscription = sns.onEvent("ontopicevent", (ev, ctx) => {
return new aws.sns.TopicEventSubscription("eventsub", sns, lambda, );
}))