Skip to main content
Skip to main content

Quick Start

From zero to security insights in under 30 seconds. No signup, no API keys โ€” just results.

Prerequisites

CDK Project

An existing AWS CDK project with TypeScript or Python

Node.js

Node.js 22+ installed on your system

AWS Credentials

AWS credentials configured for CDK synthesis

30-Second Setup

1

Navigate to your CDK project

Open your terminal and go to your CDK project directory

cd my-cdk-project
2

Install and initialize

Install CDK Insights and add npm scripts to your project

npm install --save-dev cdk-insights && npx cdk-insights init
3

Wire integrations (optional but recommended)

Add the Aspect (richer findings with file/line attribution) and the Validations Plugin (synth-time enforcement). The interactive setup writes the boilerplate into your CDK app for you.

npx cdk-insights setup
4

Run your first scan

Use the familiar npm run command to scan your CDK stacks

npm run cdk-insights
5

Review the results

CDK Insights will display a table of findings with severity levels

The analysis includes security issues, cost optimizations, and best practices

6

Optional: enable AI analysis

Add your license key to .env to unlock AI-powered recommendations. Static-only scans don't need a key.

echo "CDK_INSIGHTS_LICENSE_KEY=LIC-..." >> .env

Get a free license at https://cdkinsights.dev/start.

Example Output

CDK Insights will display a comprehensive table of findings, sorted by severity:

Resource
Stack
Severity
Service
Issue
Location
MyBucket
MyStack
๐Ÿ”ด CRITICAL
S3
S3 bucket has public read access
lib/my-stack.ts:15
MyRole
MyStack
๐ŸŸ  HIGH
IAM
IAM role has overly permissive policies
lib/my-stack.ts:25
MyFunction
MyStack
๐ŸŸก MEDIUM
Lambda
Lambda function has high memory allocation
lib/my-stack.ts:35

Go Deeper

Once you have a first scan, the two flags that make CDK Insights usable on a real codebase are --writeBaseline (so future scans only flag what's new) and cdk-insights fix --apply (mechanical remediations on demand). Wire both into CI for the full ratchet.