Skip to content

feat: personalization layer (Usage Analysis + My Stuff) — v1.1.0#25

Merged
tajdars merged 1 commit into
mainfrom
feature/personalization-v1.1.0
Jun 2, 2026
Merged

feat: personalization layer (Usage Analysis + My Stuff) — v1.1.0#25
tajdars merged 1 commit into
mainfrom
feature/personalization-v1.1.0

Conversation

@tajdars

@tajdars tajdars commented Jun 2, 2026

Copy link
Copy Markdown

v1.1.0 — Personalization layer

Adds an opt-in personalization layer on top of the base dashboard. When enabled, the dashboard offers a My stuff toggle that filters services, APIs, and CloudFormation resources to only what's actually used in your account.

What's new

  • Usage Analysis stack (--enable-usage-analysis): a new opt-in CloudFormation stack with a Step Functions state machine that orchestrates two analyzers (CloudTrail + CloudFormation) and a decorator. Output is written back to the website bucket as personalized data files.
  • Settings page: new "Run usage analysis" button that triggers analysis on demand and polls for completion.
  • Capability by Region page: new "My stuff" toggle in the page header. Active CloudFormation tab gains a Stack filter for resource types in use.
  • Auto-discovery: deploy script auto-discovers the CloudTrail bucket from describe-trails if --cloudtrail-bucket is omitted.
  • Lake Formation bootstrap: stack provisions cleanly on a fresh account by adding the analyzer role and the deployer role as Data Lake Admins (preserves any pre-existing admins).

Architecture

Component Purpose
Step Functions State Machine Runs two analyzers in parallel, then the decorator
CloudTrail Analyzer Lambda Athena queries over CloudTrail logs
CloudFormation Analyzer Lambda Inspects active CloudFormation stacks
Usage Decorator Lambda Joins analyzer output with the master catalog
Glue Database / Table + LF Permissions Schema over the CloudTrail bucket for Athena
EventBridge Rule Daily scheduled runs (configurable)

Versions

  • package.json (root + source/constructs, source/lambda, source/shared) bumped to 1.1.0.

Testing

  • 83/83 lambda unit tests + 11/11 constructs unit tests passing.
  • End-to-end verified on two fresh accounts: bootstrap CR ran, auto-discovery picked the right CloudTrail bucket, full analysis run produced personalized data, and the My stuff toggle / Stack filter rendered with non-zero counts.

Adds an opt-in personalization layer on top of the base Capability
Insights dashboard. When enabled, the dashboard offers a "My stuff"
toggle that filters services, APIs, and CloudFormation resources to
only what's actually used in your account.

The personalization is produced by a new opt-in CloudFormation stack
(CapabilityInsightsUsageAnalysis) that adds:

- A Step Functions state machine that orchestrates two analyzers in
  parallel and a decorator step
- CloudTrail Analyzer Lambda (Athena queries over CloudTrail logs)
- CloudFormation Analyzer Lambda (active CloudFormation stacks)
- Usage Decorator Lambda that joins analyzer output with the master
  catalog and writes personalized data files to the website bucket
- Glue database/table + Lake Formation permissions, with a
  Lake Formation Data Lake Admin bootstrap custom resource so the
  stack provisions cleanly on a fresh account
- EventBridge rule for daily scheduled runs (configurable)

Deploy with `npm run deploy -- --enable-usage-analysis`. The
CloudTrail bucket is auto-discovered from the account's configured
trails; pass `--cloudtrail-bucket <name>` to override.

The Settings page gains a "Run usage analysis" button that triggers
analysis on demand and polls for completion. The Capability by Region
page gains a "My stuff" toggle in the page header and a Stack filter
on the CloudFormation tab for active resource types.
@tajdars tajdars force-pushed the feature/personalization-v1.1.0 branch from 031d795 to d332a7f Compare June 2, 2026 16:00
@tajdars tajdars marked this pull request as ready for review June 2, 2026 16:40
@tajdars tajdars requested a review from a team June 2, 2026 16:40
@tajdars tajdars merged commit 63e350b into main Jun 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants