Skip to content

Installation

Interlock is deployed as infrastructure, not installed as a binary. You deploy the reusable Terraform module into your AWS account, and it provisions all the resources needed to run pipeline safety checks.

Prerequisites

DependencyVersionPurpose
Terraform1.5+Deploy the Interlock module
AWS CLI v2LatestAWS credential configuration
Go1.24+Build Lambda handler binaries
AWS AccountN/ADynamoDB, Lambda, Step Functions, EventBridge

Deploy the Terraform Module

1. Build Lambda Binaries

Clone the repository and build the Lambda handler zip files:

git clone https://github.com/dwsmith1983/interlock.git
cd interlock
./deploy/build.sh

This produces zip files in the dist/ directory for all four Lambda functions.

2. Reference the Module

In your Terraform configuration, reference the Interlock module:

module "interlock" {
  source = "github.com/dwsmith1983/interlock//deploy/terraform"

  environment    = "production"
  dist_path      = "${path.module}/dist"
  pipelines_path = "${path.module}/pipelines"
  calendars_path = "${path.module}/calendars"  # optional

  tags = {
    Project = "interlock"
  }
}

3. Apply

terraform init
terraform plan
terraform apply

This provisions:

  • 3 DynamoDB tables (control, joblog, rerun)
  • 4 Lambda functions (stream-router, orchestrator, sla-monitor, watchdog)
  • 1 Step Functions state machine
  • 1 EventBridge custom event bus
  • EventBridge schedule for the watchdog
  • IAM roles with least-privilege policies
  • SQS dead-letter queues for stream processing
  • CloudWatch log groups

What Gets Deployed

Lambda Functions

FunctionPurpose
stream-routerProcesses DynamoDB Stream events, starts Step Function executions
orchestratorEvaluates validation rules, triggers jobs, checks job status
sla-monitorCalculates SLA deadlines, fires SLA_WARNING and SLA_BREACH alerts
watchdogScans for missed schedules on an EventBridge timer

DynamoDB Tables

TablePurpose
controlPipeline configs, sensor data, evaluation state
joblogRun history and job tracking
rerunRerun request tracking

Module Variables

VariableRequiredDefaultDescription
environmentyesEnvironment name (e.g., staging, production)
dist_pathyesPath to Lambda zip files
pipelines_pathyesPath to pipeline YAML configs
calendars_pathno""Path to calendar YAML files
lambda_memory_sizeno128Lambda memory in MB
log_retention_daysno30CloudWatch log retention
watchdog_schedulenorate(5 minutes)EventBridge watchdog schedule
sfn_timeout_secondsno43200Step Functions execution timeout (12h default)

Module Outputs

OutputDescription
control_table_nameName of the control DynamoDB table
control_table_arnARN of the control DynamoDB table
joblog_table_nameName of the job log DynamoDB table
rerun_table_nameName of the rerun DynamoDB table
event_bus_nameName of the EventBridge event bus
event_bus_arnARN of the EventBridge event bus
sfn_arnARN of the pipeline state machine
sfn_nameName of the pipeline state machine