Prerequisites
Install these tools before starting. Skip any that are already installed.Docker Desktop
Required for LocalStack and Lambda testing. Enable WSL2 integration.
.NET 6.0 SDK
Required to build and run Dash360 and Lambda functions.
Terraform
Deploys Lambda infrastructure to LocalStack. Install to
C:\terraform\.LocalStack Pro
Required for Lambda function support. Contact Jeff for the Pro token.
- AWS CLI (required by Terraform for Step Functions in LocalStack) — install guide
- Visual Studio or VS Code — for development
- SQL Server Developer Edition — local database
Step 1: SQL Server Configuration
Enable Mixed Mode Authentication
- Open SQL Server Management Studio (SSMS)
- Connect to your local SQL Server instance
- Right-click the server → Properties → Security tab
- Under “Server authentication”, select SQL Server and Windows Authentication mode
- Click OK
- Restart the SQL Server service (required for the change to take effect)
Enable TCP/IP
- Open SQL Server Configuration Manager
- Start Menu → “SQL Server Configuration Manager”, or run:
SQLServerManager16.msc
- Start Menu → “SQL Server Configuration Manager”, or run:
- Navigate to: SQL Server Network Configuration → Protocols for MSSQLSERVER
- Right-click TCP/IP → Enable
- Right-click TCP/IP → Properties → IP Addresses tab
- Scroll to the IPAll section, set TCP Port to
1433 - Restart SQL Server service
Create Database User for Lambda Access
Allow Firewall Access
Find Your IP Address
Docker containers cannot uselocalhost to reach your SQL Server. Use your machine’s actual IP:
Step 2: LocalStack Pro Setup
Get your auth token
Sign in to app.localstack.cloud → Account → Auth Tokens → copy your token
Install the LocalStack CLI
Download the Windows LocalStack CLI from the LocalStack website (Getting Started section). Extract
localstack.exe to C:\localstack\.Add to your PATH:Step 3: Create the .env File
The .env file in the solution root is git-ignored. It configures LocalStack, Terraform, and the web app with your local IP and database credentials.
.env and set these values:
Both Terraform and the C# app read from this single
.env file. Keep it updated when your IP changes.Step 4: Start LocalStack
http://localhost:8080 to inspect S3 buckets, SQS queues, Lambda functions, and logs.
Step 5: Build and Deploy to LocalStack
Run this PowerShell script from Windows PowerShell (not WSL):- Builds
Dash360.Lambda.SharedLayer(Release) - Builds
Dash360.Lambda(Release) - Publishes Lambda for Linux runtime (
linux-x64) - Runs
terraform init(uses committed lock file for consistent provider versions) - Runs
terraform apply -auto-approve
- SQS Queues (export, import, backup, DLQ)
- DynamoDB Tables (jobs, transactions, configuration)
- S3 Buckets with tenant folder structure
- Lambda Functions (ExportRouter, WebhookRouter, RiskCategories, RiskTypes, PremiumPay, and more)
- EventBridge rules for progress notifications
- SSM Parameters for tenant configuration
Step 6: Configure appsettings.Development.json
This file is checked in with LocalStack defaults. Verify these settings match your setup:
BackupProjectArn is empty because LocalStack uses a workaround via AWS CLI during terraform apply. To get the ARN after deployment:appsettings.Development.json if you need to test Backup Project locally.Step 7: Run the Web App
Open the solution in Visual Studio and run the Dash360 project in debug mode (F5).Step 8: Verify Everything Works
Test an Export
- Navigate to Admin → Import/Export → Export
- Select a data type (e.g., “Risk Categories”)
- Click Export
- A notification in the bell icon with a progress bar
- The export appear in the “Recent Exports” grid
- Auto-download when complete
Test Backup Project
- Navigate to Admin → Projects
- Select any project
- Click Backup Project (New)
Run Lambda Tests
Quick Start Checklist
- SQL Server: Mixed Mode enabled, TCP/IP enabled,
wsluser created, port 1433 firewall rule added - Docker Desktop: Running, WSL2 integration enabled
- LocalStack Pro: Token obtained, CLI installed, auth token configured
-
.envfile: Created from template, IP addresses updated - LocalStack: Started (
docker compose up -d), reports healthy - Lambda deployed:
.\deploy-localstack.ps1ran successfully -
appsettings.Development.json: Settings verified - Web app: Running in Visual Studio
- Exports: Test export completes with notification and auto-download
Re-Deploying After Code Changes
Any time you modify Lambda function code:Key File Locations
| Component | Path |
|---|---|
| Docker Compose | Dash360.LocalStack/docker-compose.yml |
| Terraform (LocalStack) | Dash360.Infrastructure/terraform/environments/localstack/main.tf |
| Deploy Script | Dash360.Infrastructure/terraform/environments/localstack/deploy-localstack.ps1 |
| Lambda Functions | Dash360.Lambda/Functions/ |
| Lambda Shared Layer | Dash360.Lambda.SharedLayer/ |
| Lambda Tests | Dash360.Lambda.Tests/ |
| Export Controller | Dash360/Areas/Admin/Controllers/LambdaExportController.cs |
| Export Service | Dash360/Services/LambdaExportService.cs |
| App Settings (local) | Dash360/appsettings.Development.json |
| Env Template | .env.template |
Troubleshooting
Webhook Notifications Not Working
If exports complete but you don’t see live progress in the notification bell, the webhook endpoint is unreachable from inside LocalStack’s Docker container. The notification flow is:Verify your port number
Check what port Visual Studio is running the web app on (look at the browser URL). Update
.env to match:Test connectivity from inside the container
200or400= reachable (the endpoint exists)000or timeout = not reachable (the problem)
Add a Windows Firewall inbound rule
Open Windows Defender Firewall → Advanced Settings → Inbound Rules → New Rule:
- Port → TCP → Specific port:
53720 - Allow the connection
- Name: “Dash360 LocalStack Webhook”
Other Common Issues
| Issue | Solution |
|---|---|
docker compose up fails | Ensure Docker Desktop is running with WSL2 integration enabled |
| LocalStack not healthy | Check docker logs dash360-localstack. Verify .env has a valid LOCALSTACK_AUTH_TOKEN |
| Terraform hangs on apply | Delete terraform.tfstate*, restart LocalStack, re-apply |
| Exports go to wrong tenant | Check that ITenantResolutionService resolves your hostname correctly (localhost → testcustomer) |
| “Export service not available” | Ensure LambdaExportService is registered in Startup.cs. Check AWS:SQS:ExportQueueUrl is set |
| Download button not appearing | Check DynamoDB record for the job — needs S3Location in ResultData |
| Backup Project button missing | Set FeatureFlags:NewBackupProject to true in appsettings.Development.json |
| Terraform state is corrupt | Delete terraform.tfstate and terraform.tfstate.backup, then re-apply |

