Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.attributeQueue = new sqs.Queue(this, "attributeQueue", {
visibilityTimeout: attributeQueueTimeout,
});
// ----------------------------------------------------------------
// Lambda Functions
const baseEnvVars = {
TASK_TOPIC: this.taskTopic.topicArn,
REPORT_TOPIC: this.reportTopic.topicArn,
CACHE_TABLE: this.cacheTable.tableName,
};
const nodeModulesLayer = new lambda.LayerVersion(this, "NodeModulesLayer", {
code: lambda.AssetCode.fromAsset("????"),
compatibleRuntimes: [lambda.Runtime.NODEJS_10_X],
});
this.recvAlert = new NodejsFunction(this, "recvAlert", {
entry: path.join(__dirname, "lambda/recvAlert.js"),
handler: "main",
timeout: alertQueueTimeout,
role: lambdaRole,
events: [new SqsEventSource(this.alertQueue)],
environment: Object.assign(baseEnvVars, {
INSPECTOR_MACHINE: "",
REVIEW_MACHINE: "",
}),
});
this.submitContent = new NodejsFunction(this, "submitContent", {
entry: path.join(__dirname, "lambda/submitContent.js"),
handler: "main",
role: lambdaRole,
events: [new SqsEventSource(this.alertQueue)],
handler: "main",
role: lambdaRole,
});
this.publishReport = new NodejsFunction(this, "publishReport", {
entry: path.join(__dirname, "lambda/publishReport.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.stepFunctionError = new NodejsFunction(this, "stepFunctionError", {
entry: path.join(__dirname, "lambda/stepFunctionError.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.lambdaError = new NodejsFunction(this, "lambdaError", {
entry: path.join(__dirname, "lambda/lambdaError.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.inspectionMachine = buildInspectionMachine(
this,
this.dispatchInspection,
this.stepFunctionError,
props.inspectDelay,
sfnRole
);
this.inspectionMachine = buildReviewMachine(
this,
handler: "main",
role: lambdaRole,
events: [new SqsEventSource(this.alertQueue)],
environment: baseEnvVars,
});
this.feedbackAttribute = new NodejsFunction(this, "feedbackAttribute", {
entry: path.join(__dirname, "lambda/feedbackAttribute.js"),
handler: "main",
timeout: attributeQueueTimeout,
role: lambdaRole,
events: [new SqsEventSource(this.attributeQueue)],
environment: baseEnvVars,
});
this.dispatchInspection = new NodejsFunction(this, "dispatchInspection", {
entry: path.join(__dirname, "lambda/dispatchInspection.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.compileReport = new NodejsFunction(this, "compileReport", {
entry: path.join(__dirname, "lambda/compileReport.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.dummyReviewer = new NodejsFunction(this, "dummyReviewer", {
entry: path.join(__dirname, "lambda/dummyReviewer.js"),
handler: "main",
role: lambdaRole,
});
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.dummyReviewer = new NodejsFunction(this, "dummyReviewer", {
entry: path.join(__dirname, "lambda/dummyReviewer.js"),
handler: "main",
role: lambdaRole,
});
this.publishReport = new NodejsFunction(this, "publishReport", {
entry: path.join(__dirname, "lambda/publishReport.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.stepFunctionError = new NodejsFunction(this, "stepFunctionError", {
entry: path.join(__dirname, "lambda/stepFunctionError.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.lambdaError = new NodejsFunction(this, "lambdaError", {
entry: path.join(__dirname, "lambda/lambdaError.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.inspectionMachine = buildInspectionMachine(
this,
this.dispatchInspection,
this.stepFunctionError,
this.feedbackAttribute = new NodejsFunction(this, "feedbackAttribute", {
entry: path.join(__dirname, "lambda/feedbackAttribute.js"),
handler: "main",
timeout: attributeQueueTimeout,
role: lambdaRole,
events: [new SqsEventSource(this.attributeQueue)],
environment: baseEnvVars,
});
this.dispatchInspection = new NodejsFunction(this, "dispatchInspection", {
entry: path.join(__dirname, "lambda/dispatchInspection.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.compileReport = new NodejsFunction(this, "compileReport", {
entry: path.join(__dirname, "lambda/compileReport.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.dummyReviewer = new NodejsFunction(this, "dummyReviewer", {
entry: path.join(__dirname, "lambda/dummyReviewer.js"),
handler: "main",
role: lambdaRole,
});
this.publishReport = new NodejsFunction(this, "publishReport", {
entry: path.join(__dirname, "lambda/publishReport.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
code: lambda.AssetCode.fromAsset("????"),
compatibleRuntimes: [lambda.Runtime.NODEJS_10_X],
});
this.recvAlert = new NodejsFunction(this, "recvAlert", {
entry: path.join(__dirname, "lambda/recvAlert.js"),
handler: "main",
timeout: alertQueueTimeout,
role: lambdaRole,
events: [new SqsEventSource(this.alertQueue)],
environment: Object.assign(baseEnvVars, {
INSPECTOR_MACHINE: "",
REVIEW_MACHINE: "",
}),
});
this.submitContent = new NodejsFunction(this, "submitContent", {
entry: path.join(__dirname, "lambda/submitContent.js"),
handler: "main",
role: lambdaRole,
events: [new SqsEventSource(this.alertQueue)],
environment: baseEnvVars,
});
this.feedbackAttribute = new NodejsFunction(this, "feedbackAttribute", {
entry: path.join(__dirname, "lambda/feedbackAttribute.js"),
handler: "main",
timeout: attributeQueueTimeout,
role: lambdaRole,
events: [new SqsEventSource(this.attributeQueue)],
environment: baseEnvVars,
});
events: [new SqsEventSource(this.alertQueue)],
environment: Object.assign(baseEnvVars, {
INSPECTOR_MACHINE: "",
REVIEW_MACHINE: "",
}),
});
this.submitContent = new NodejsFunction(this, "submitContent", {
entry: path.join(__dirname, "lambda/submitContent.js"),
handler: "main",
role: lambdaRole,
events: [new SqsEventSource(this.alertQueue)],
environment: baseEnvVars,
});
this.feedbackAttribute = new NodejsFunction(this, "feedbackAttribute", {
entry: path.join(__dirname, "lambda/feedbackAttribute.js"),
handler: "main",
timeout: attributeQueueTimeout,
role: lambdaRole,
events: [new SqsEventSource(this.attributeQueue)],
environment: baseEnvVars,
});
this.dispatchInspection = new NodejsFunction(this, "dispatchInspection", {
entry: path.join(__dirname, "lambda/dispatchInspection.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.compileReport = new NodejsFunction(this, "compileReport", {
entry: path.join(__dirname, "lambda/compileReport.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.compileReport = new NodejsFunction(this, "compileReport", {
entry: path.join(__dirname, "lambda/compileReport.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.dummyReviewer = new NodejsFunction(this, "dummyReviewer", {
entry: path.join(__dirname, "lambda/dummyReviewer.js"),
handler: "main",
role: lambdaRole,
});
this.publishReport = new NodejsFunction(this, "publishReport", {
entry: path.join(__dirname, "lambda/publishReport.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.stepFunctionError = new NodejsFunction(this, "stepFunctionError", {
entry: path.join(__dirname, "lambda/stepFunctionError.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.lambdaError = new NodejsFunction(this, "lambdaError", {
entry: path.join(__dirname, "lambda/lambdaError.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
environment: baseEnvVars,
});
this.dispatchInspection = new NodejsFunction(this, "dispatchInspection", {
entry: path.join(__dirname, "lambda/dispatchInspection.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.compileReport = new NodejsFunction(this, "compileReport", {
entry: path.join(__dirname, "lambda/compileReport.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.dummyReviewer = new NodejsFunction(this, "dummyReviewer", {
entry: path.join(__dirname, "lambda/dummyReviewer.js"),
handler: "main",
role: lambdaRole,
});
this.publishReport = new NodejsFunction(this, "publishReport", {
entry: path.join(__dirname, "lambda/publishReport.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});
this.stepFunctionError = new NodejsFunction(this, "stepFunctionError", {
entry: path.join(__dirname, "lambda/stepFunctionError.js"),
handler: "main",
role: lambdaRole,
environment: baseEnvVars,
});