Skip to main content

Functional Architecture


Module: Lens Platform: Stormus Version: 1.0.0-RELEASE Last Updated: October 25, 2025 Document Type: Functional Architecture (Business View)


Table of Contents​

  1. Introduction
  2. Business Capabilities
  3. Use Cases & Scenarios
  4. Feature Breakdown by Domain
  5. User Personas & Workflows
  6. Business Logic Overview
  7. Value Streams

Introduction​

This document describes the functional architecture of the AWS Lens module from a business perspective. It focuses on what the system does, who uses it, and why it provides value, rather than the technical implementation details.

Purpose of This Document​

  • Define business capabilities and features
  • Document use cases and user workflows
  • Explain business logic and rules
  • Map features to business value
  • Guide product managers, business analysts, and stakeholders

Business Capabilities​

Lens provides 6 core business capabilities that support cloud financial management (FinOps):

Capability 1: Cost Visibility & Analysis​

What it does: Provides multi-dimensional visibility into cloud spending

Business Value: Organizations can see exactly where money is being spent across services, accounts, regions, and resources

Key Features:

  • Real-time cost dashboards
  • Historical cost trends
  • Service-level cost breakdowns
  • Account-level cost attribution
  • Tag-based cost allocation

Supported Decisions:

  • Which services are driving costs?
  • Is spending increasing or decreasing?
  • Which teams/projects are consuming budget?
  • Are there unexpected cost spikes?

Capability 2: Reserved Instance (RI) Optimization​

What it does: Manages Reserved Instance portfolio to maximize savings

Business Value: RIs can save 30-75% vs on-demand pricing, but unused RIs waste money. This capability ensures RIs are purchased wisely and utilized fully.

Key Features:

  • RI inventory management
  • Utilization tracking
  • Coverage analysis (what % of usage is covered by RIs)
  • Expiry notifications
  • Purchase recommendations

Supported Decisions:

  • Should we buy more RIs?
  • Which RIs are underutilized?
  • When do our RIs expire?
  • What's the ROI of RI purchases?

Capability 3: Cost Forecasting & Budgeting​

What it does: Predicts future spending based on historical trends

Business Value: Finance teams can create accurate budgets and avoid overspending

Key Features:

  • Trend-based forecasting
  • Budget threshold alerts
  • Month-over-month comparisons
  • Year-over-year growth analysis

Supported Decisions:

  • What will next quarter's cloud bill be?
  • Are we on track to meet budget?
  • Should we increase/decrease budget allocation?

Capability 4: Cost Optimization Recommendations​

What it does: Identifies specific actions to reduce cloud spend

Business Value: Actionable recommendations save money with clear ROI

Key Features:

  • Idle resource detection (unused ELBs, EIPs, volumes)
  • Rightsizing recommendations (over-provisioned instances)
  • Storage tier optimization (S3 lifecycle policies)
  • RI/Savings Plan purchase suggestions

Supported Decisions:

  • Which resources should we shut down?
  • Which instances should we downsize?
  • Should we move data to cheaper storage classes?

Capability 5: Financial Reporting & Compliance​

What it does: Generates reports for internal stakeholders and auditors

Business Value: Provides documentation for chargebacks, showbacks, audits, and executive reviews

Key Features:

  • Monthly billing summaries
  • Chargeback/showback reports
  • Tag compliance reports
  • Export to Excel/CSV
  • Scheduled report delivery

Supported Decisions:

  • How do we allocate costs to departments?
  • Which resources are untagged?
  • What reports do we send to executives?

Capability 6: Anomaly Detection & Alerting​

What it does: Automatically detects unusual spending patterns and notifies users

Business Value: Catches cost overruns early before they become major problems

Key Features:

  • Threshold-based alerts (budget exceeded)
  • ML-based anomaly detection (unusual spikes)
  • Daily cost summaries
  • RI utilization alerts

Supported Decisions:

  • Why did costs spike yesterday?
  • Should we investigate this service?
  • Are our alerts configured correctly?

Use Cases & Scenarios​

Use Case 1: Monthly Cost Review Meeting​

Persona: FinOps Manager (Sarah)

Scenario: Sarah needs to prepare for the monthly cost review meeting with executives.

Steps:

  1. View Billing Console:

    • API: GET /billing-console/monthly
    • Sees: Total spend for last month ($185,000)
    • Compares: vs previous month ($172,000 = +7.6%)
    • Identifies: Top 3 cost drivers (EC2: $85K, RDS: $45K, S3: $25K)
  2. Drill Down by Service:

    • API: GET /cost-breakup/database
    • Finds: RDS costs increased by $8K
    • Root cause: New production database launched mid-month
  3. Check Account Breakdown:

    • API: GET /account-wise-breakup/v2
    • Discovers: Dev account spending increased 25%
    • Action: Schedule meeting with dev team lead
  4. Generate Executive Report:

    • API: GET /billing-console/exportMonthlyReport
    • Downloads: PDF report with charts and tables
    • Outcome: Presents to executives with data-backed insights

Business Value: Sarah prepared a comprehensive cost review in 30 minutes instead of 4 hours of manual Excel work.


Use Case 2: RI Purchase Decision​

Persona: Cloud Architect (Mike)

Scenario: Mike's EC2 on-demand costs are $50K/month. He wants to know if buying RIs makes sense.

Steps:

  1. Check RI Coverage:

    • API: GET /ri-coverage
    • Sees: Only 40% of EC2 usage covered by RIs
    • Finds: m5.xlarge instances run 24/7 without RIs
  2. Review RI Recommendations:

    • API: GET /recommendations
    • AWS recommends: Buy 20x m5.xlarge 3-year No Upfront RIs
    • Projected savings: $18K/year
  3. Check Current RI Utilization:

    • API: GET /reservation-utilization
    • Sees: Existing RIs at 95% utilization (good!)
    • Confidence: New RIs will also be well-utilized
  4. Validate with Cost Trends:

    • API: GET /cost-trends
    • Confirms: EC2 usage has been stable for 6 months
    • Decision: Safe to commit to 3-year RIs
  5. Purchase RIs (outside Lens):

    • Buys RIs through AWS Console
    • Sets reminder: Track utilization next month
  6. Monitor Post-Purchase:

    • API: GET /reservation-utilization (1 month later)
    • Verifies: New RIs at 98% utilization
    • Outcome: Saving $1,500/month as projected

Business Value: Mike made a $54K commitment with confidence, backed by data showing stable usage and good historical RI utilization.


Use Case 3: Cost Spike Investigation​

Persona: DevOps Engineer (Alex)

Scenario: Alex receives an alert: "Daily spend increased 45% yesterday"

Steps:

  1. Check Daily Cost Alert:

    • API: Alert received via alertsapi/DailyReportController
    • Alert says: Yesterday's cost = $7,200 (normal = $5,000)
    • Increase: +$2,200 (+44%)
  2. Identify Service Responsible:

    • API: GET /billing-console/dailyBreakup
    • Finds: S3 costs jumped from $800 to $2,900
    • Root cause: S3 service caused the spike
  3. Drill Into S3 Costs:

    • API: GET /cost-breakup/storage
    • Discovers:
      • Storage costs normal ($1,200)
      • Request costs exploded ($1,700 for GET requests)
    • Pattern: 2.5 billion GET requests yesterday (normal = 500M)
  4. Check S3 Dashboard (CUDOS):

    • API: GET /cudos/s3-dashboard
    • Identifies: Specific bucket "app-logs-prod" had 2B requests
    • Problem: Misconfigured application querying S3 in tight loop
  5. Investigate Application Logs:

    • Correlates with app deployment at 2 PM yesterday
    • Finds: New feature had bug causing excessive S3 reads
  6. Resolution:

    • Rolls back deployment
    • Fixes bug
    • Monitors next day: Costs back to normal ($5,100)

Business Value: Alex identified and fixed a $60K/month cost issue within 2 hours of detection, saving the company from a major budget overrun.


Use Case 4: Tag Compliance Audit​

Persona: Finance Manager (Lisa)

Scenario: Lisa needs to allocate costs to departments for chargeback, but resources aren't properly tagged.

Steps:

  1. Generate Tag Report:

    • API: GET /tag-report
    • Filters: Tag key = "Department"
    • Finds: Only 65% of resources have Department tag
  2. Identify Untagged Resources:

    • Report shows: 35% of costs ($31K/month) unallocated
    • Breakdown:
      • Engineering team's dev account: 80% tagged ✓
      • Marketing team's analytics account: 20% tagged ✗
  3. Export Untagged Resources:

    • API: GET /tag-report/export
    • Downloads: Excel file with all untagged resource IDs
    • Shares: With team leads for remediation
  4. Set Tagging Policy:

    • Works with DevOps to enforce mandatory tags
    • Configures: AWS Service Control Policies (SCPs)
    • Result: All new resources must have Department tag
  5. Monitor Compliance (Next Month):

    • API: GET /tag-report
    • Improvement: 92% tagged (up from 65%)
    • Outcome: Can now accurately allocate 92% of costs

Business Value: Lisa improved cost allocation accuracy, enabling fair chargebacks and better departmental accountability.


Use Case 5: Budget Threshold Alert​

Persona: VP of Engineering (David)

Scenario: David receives alert: "Monthly budget 80% consumed with 10 days left in month"

Steps:

  1. Review Cost Alert:

    • API: Alert from alertsapi/CostAlertController
    • Budget: $200K/month
    • Spent so far: $160K (80%)
    • Days remaining: 10
    • Projection: Will exceed budget by $40K
  2. Analyze Spending Trend:

    • API: GET /cost-trends
    • Finds: Spending accelerated in last week
    • Average: $7K/day first 3 weeks, $11K/day last 7 days
  3. Identify Cost Drivers:

    • API: GET /billing-console/cost
    • Top changes:
      • EC2: +$2K/day (new auto-scaling group)
      • RDS: +$1K/day (larger instance type)
      • Data Transfer: +$1K/day (increased API traffic)
  4. Check Optimization Opportunities:

    • API: GET /recommendations
    • Finds:
      • 5 idle load balancers ($500/month)
      • Oversized RDS instance ($2K/month savings)
      • S3 data to Glacier ($1K/month savings)
  5. Take Action:

    • Deletes idle load balancers immediately
    • Schedules RDS downsize for weekend
    • Enables S3 lifecycle policy
    • Expected savings: $3.5K/month
  6. Adjust Forecast:

    • With optimizations: Projects $215K final spend
    • Buffer: Acceptable 7.5% overage vs 20% without action

Business Value: David avoided a 20% budget overrun by taking proactive action based on data-driven insights, limiting overage to 7.5%.


Use Case 6: CUDOS Dashboard Analysis​

Persona: Storage Architect (Emily)

Scenario: Emily wants to optimize S3 costs after receiving feedback that storage costs are high.

Steps:

  1. Open S3 CUDOS Dashboard:

    • API: GET /cudos/s3-dashboard
    • Total S3 cost: $28K/month
    • Breakdown:
      • Standard storage: $15K (1.2 PB)
      • Intelligent-Tiering: $5K (800 TB)
      • Glacier: $3K (2 PB)
      • Requests: $5K
  2. Analyze Storage Distribution:

    • Finds: 60% of Standard storage is >90 days old
    • Opportunity: Move old data to cheaper tiers
    • Potential savings: $7K/month
  3. Review Access Patterns:

    • Dashboard shows:
      • 80% of GET requests to 20% of objects (hot data)
      • Remaining objects rarely accessed (cold data)
  4. Implement Lifecycle Policies:

    • Creates policy:
      • Day 30: Standard → Intelligent-Tiering
      • Day 90: Intelligent-Tiering → Glacier
      • Day 365: Glacier → Deep Archive
    • Applies to 15 largest buckets
  5. Monitor Results (Next Month):

    • API: GET /cudos/s3-dashboard
    • New cost: $22K/month (down from $28K)
    • Savings: $6K/month = $72K/year
    • Access performance: No degradation reported

Business Value: Emily reduced S3 costs by 21% ($72K/year) with zero impact on application performance, using data-driven insights from CUDOS dashboard.


Feature Breakdown by Domain​

Domain 1: Cost Visibility​

1.1 AWS vs Actual Cost Comparison​

Business Purpose: Validate that AWS billing matches actual resource usage

Controller: AwsVsActualCostController

Features:

  • Cost Summary (/cost/summary):

    • Total AWS billed cost
    • Total actual usage cost
    • Variance analysis
    • Service-level breakdown
  • Enhanced Summary V2 (/cost/v2/summary):

    • Multi-account aggregation
    • Region-level breakdown
    • Tag-based grouping
    • Historical comparison
  • Detailed Breakdown (/cost/v2/detail):

    • Resource-level cost attribution
    • Hourly granularity
    • Usage quantity details
    • Rate card information
  • Export (/cost/export):

    • Excel export with charts
    • PDF summary report
    • Email delivery option

Business Rules:

  • Variance >5% triggers investigation flag
  • Marketplace savings calculated as: (AWS Standard - Marketplace) / AWS Standard
  • Only completed months shown in reports

Use Case: Validate marketplace savings, identify billing discrepancies


1.2 Billing Console​

Business Purpose: Centralized dashboard for all billing information

Controller: BillingConsoleController

Features:

  • Current Month Cost (/billing-console/cost):

    • MTD (month-to-date) spend
    • Projected end-of-month total
    • Budget comparison
    • Top 10 services
  • Monthly Bill (/billing-console/monthly):

    • Complete monthly billing summary
    • Service breakdown
    • Account breakdown
    • MoM comparison
  • Daily Breakup (/billing-console/dailyBreakup):

    • Daily cost over time (line chart)
    • Day-over-day changes
    • Anomaly highlights
  • Previous Months (/billing-console/previousMonths):

    • Historical monthly costs (12 months)
    • Trend analysis
    • Seasonal patterns
  • Export Monthly Report (/billing-console/exportMonthlyReport):

    • PDF executive summary
    • Excel detailed line items
    • Automated email delivery

Business Rules:

  • Current month updated daily
  • Previous months locked after finalization
  • Budget comparison uses fiscal year budgets
  • Top services ranked by absolute cost (not % change)

Use Case: Executive dashboard, monthly cost reviews


1.3 Billing Summary​

Business Purpose: Generate comprehensive billing reports for stakeholders

Controller: BillingSummaryController

Features:

  • Aggregated monthly/quarterly summaries
  • Chargeback/showback reports
  • Cost allocation by tags
  • Invoice-ready reports

Business Rules:

  • Reports generated on 1st day of month (for previous month)
  • Tag-based allocation requires 80%+ tag coverage
  • Unallocated costs shown separately
  • Reports archived for 7 years (compliance)

Use Case: Finance team monthly closes, executive reporting


1.4 Cost Explorer​

Business Purpose: Ad-hoc cost analysis with flexible filtering

Controller: CostExplorerController

Features:

  • Multi-Dimensional Filtering:

    • Time period (hourly, daily, monthly)
    • AWS service
    • Region
    • Account
    • Tags (key-value pairs)
    • Resource IDs
  • Visualizations:

    • Line charts (trends)
    • Bar charts (comparisons)
    • Pie charts (distribution)
    • Data tables (details)
  • Group By Options:

    • Service
    • Region
    • Account
    • Tag
    • Resource type

Business Rules:

  • Max date range: 365 days
  • Max 5 filters applied simultaneously
  • Results cached for 15 minutes
  • Export limited to 100K rows

Use Case: Ad-hoc cost investigations, custom analysis


Business Purpose: Identify spending patterns and forecast future costs

Controller: CostTrendsController

Features:

  • Trend Analysis:

    • Week-over-week (WoW) growth
    • Month-over-month (MoM) comparison
    • Year-over-year (YoY) trends
    • Quarter-over-quarter (QoQ)
  • Forecasting:

    • Linear projection (simple trend)
    • Seasonal adjustment
    • 30/60/90-day forecasts
    • Confidence intervals
  • Anomaly Detection:

    • Statistical outlier detection
    • Threshold-based alerts
    • Contextual anomalies (e.g., weekend spikes)

Business Rules:

  • Requires 30+ days of data for trends
  • Forecasts assume current usage patterns continue
  • Anomaly = >2 standard deviations from mean
  • Seasonal adjustments for Dec (holiday spike), Jul-Aug (summer dip)

Use Case: Budget planning, capacity forecasting


1.6 Account-Wise Breakup​

Business Purpose: Segment costs across AWS accounts in organization

Controller: AccountWiseBreakupController, AccountWiseBreakupV2Controller

Features:

  • V1 (Original):

    • List all accounts with total cost
    • Flat structure
    • Basic filters
  • V2 (Enhanced):

    • Organizational Unit (OU) hierarchy
    • Linked account rollups
    • Cost allocation tags
    • Drill-down navigation

Business Rules:

  • Master/payer account costs allocated proportionally
  • Support/tax costs distributed by usage
  • Reserved Instance benefits credited to purchasing account
  • Cross-account S3 transfer costs attributed to requester

Use Case: Multi-account cost allocation, team chargebacks


Domain 2: Reserved Instance Management​

2.1 RI Inventory​

Business Purpose: Track all Reserved Instance purchases

Controller: ReservationController

Features:

  • RI Summary (/reservation-summary/get):

    • All active RIs
    • RI attributes (type, term, payment option)
    • Start/end dates
    • Scope (regional/zonal)
    • State (active/retired)
  • Export (/reservation-summary/export):

    • Excel export of RI inventory
    • Expiry calendar
    • Utilization summary

Business Rules:

  • RIs grouped by instance family
  • Convertible RIs shown separately from Standard
  • Expiring RIs (<90 days) highlighted
  • Regional RIs apply across AZs

Use Case: RI portfolio management, expiry tracking


2.2 RI Utilization​

Business Purpose: Ensure RIs are fully utilized

Controller: ReservationUtilizationController

Features:

  • Utilization Metrics:

    • Utilization % (RI hours used / RI hours purchased)
    • Unused RI hours
    • On-Demand equivalent hours covered
    • Net savings realized
  • Low Utilization Alerts:

    • <80% triggers warning
    • <60% triggers critical alert
    • Recommendations for modification

Business Rules:

  • Utilization calculated daily
  • Monthly average displayed
  • Zonal RIs count as underutilized if AZ has excess capacity
  • Partial hour usage rounds up

Use Case: RI optimization, modification decisions


2.3 RI Coverage​

Business Purpose: Identify gaps in RI coverage for potential purchases

Controller: RiCoverageController

Features:

  • Coverage Analysis:

    • % of total usage covered by RIs
    • Coverage by instance family
    • Uncovered On-Demand spend
    • Coverage gap = opportunity
  • Purchase Recommendations:

    • Recommended RI purchases
    • Payback period
    • Break-even analysis
    • ROI calculation

Business Rules:

  • Coverage target: 70-80% (not 100%, leave flexibility)
  • Recommendations require 30+ days stable usage
  • ROI calculated as: Annual savings / Upfront cost
  • Payback period = Upfront cost / Monthly savings

Use Case: RI purchase planning, business case creation


2.4 RI Expiry Alerts​

Business Purpose: Prevent loss of savings when RIs expire

Controller: alertsapi/RiExpiryAlertController

Features:

  • Expiry Notifications:

    • 90 days before expiry
    • 60 days before expiry
    • 30 days before expiry
    • Day of expiry
  • Renewal Recommendations:

    • Should we renew? (based on utilization)
    • Suggested term (1yr vs 3yr)
    • Payment option advice

Business Rules:

  • Alert if RI utilization >75% (worth renewing)
  • No alert if utilization <50% (don't renew)
  • Auto-renewal not supported (manual decision)

Use Case: Proactive RI management, avoid lapses


Domain 3: Cost Breakdowns by AWS Service​

3.1 Analytics Services​

Business Purpose: Break down costs for data analytics services

Controller: costbreakup/AnalyticsController

Services Covered: Kinesis Data Streams, EMR, Athena, Glue, Data Pipeline

Cost Dimensions:

  • Kinesis: Shard hours, PUT payload units, enhanced fanout
  • EMR: Cluster hours by instance type, storage
  • Athena: Data scanned (per GB)
  • Glue: DPU hours, crawls

Business Rules:

  • Athena costs reduced by partitioning (education opportunity)
  • EMR Spot instances save 70-90% (recommendation)
  • Kinesis On-Demand vs Provisioned decision at 4MB/sec threshold

Use Case: Optimize big data processing costs


3.2 Container Services​

Business Purpose: Break down costs for containerized workloads

Controller: costbreakup/ContainersController

Services Covered: ECS, EKS, Fargate, ECR

Cost Dimensions:

  • ECS: Task execution hours, EC2 instances
  • EKS: Cluster hours ($0.10/hour), worker nodes
  • Fargate: vCPU-seconds, GB-seconds
  • ECR: Storage, data transfer

Business Rules:

  • Fargate vs EC2 cost comparison shown
  • EKS cluster cost amortized across workloads
  • ECR lifecycle policies reduce storage costs

Use Case: Container cost optimization, Fargate ROI analysis


3.3 Database Services​

Business Purpose: Break down costs for managed databases

Controller: costbreakup/DatabaseController

Services Covered: RDS, DynamoDB, ElastiCache, Redshift, DocumentDB, Neptune, OpenSearch

Cost Dimensions:

  • RDS: Instance hours, storage (GP2/GP3/IO1), IOPS, backups, data transfer
  • DynamoDB: Read/write capacity units, storage, backups, streams
  • ElastiCache: Node hours, data transfer
  • Redshift: Node hours, storage, Spectrum queries
  • OpenSearch: Instance hours, storage, UltraWarm

Business Rules:

  • RDS Multi-AZ costs shown separately
  • DynamoDB On-Demand vs Provisioned breakeven at 50% utilization
  • Backup costs over 100% of storage trigger alert
  • Redshift Reserved Nodes save 50%+

Use Case: Database cost optimization, On-Demand vs Provisioned decisions


3.4 Data Transfer Costs​

Business Purpose: Identify expensive data movement

Controller: costbreakup/DataTransferController

Transfer Types:

  • Inter-AZ: Within region, across AZs ($0.01/GB each way)
  • Inter-Region: Between AWS regions ($0.02/GB)
  • Internet Egress: To internet ($0.09/GB)
  • Service-Specific: S3, CloudFront, EC2, RDS

Cost Dimensions:

  • Source/destination pairs
  • Protocol (HTTP, database replication, etc.)
  • Volume (GB)

Business Rules:

  • Data transfer IN always free
  • CloudFront egress cheaper than direct S3 egress
  • VPC endpoints eliminate inter-AZ charges for AWS services
  • High inter-AZ transfer suggests multi-AZ architecture issue

Use Case: Optimize data movement, reduce transfer costs


3.5 Instance Costs​

Business Purpose: Analyze compute instance spending

Controller: costbreakup/InstanceCostController

Services Covered: EC2, RDS instances, ElastiCache nodes, Redshift nodes

Cost Dimensions:

  • Instance type distribution
  • On-Demand vs RI vs Spot
  • Instance hours
  • Utilization metrics

Business Rules:

  • Spot instances save 70-90% (show potential savings)
  • Burstable instances (t3/t4g) flagged if credits exhausted
  • Oversized instances (low CPU) flagged for rightsizing

Use Case: Instance rightsizing, Spot adoption


3.6 Storage Services​

Business Purpose: Break down storage costs across S3, EBS, EFS

Controller: costbreakup/StorageController

Services Covered: S3, EBS, EFS, Glacier, FSx

Cost Dimensions:

  • S3: Storage by class, requests, data transfer, features (versioning, replication)
  • EBS: Volume costs by type (gp2/gp3/io1/io2), snapshots
  • EFS: Storage by class (Standard/IA), throughput
  • Glacier: Storage, retrieval costs, retrieval time

Business Rules:

  • S3 Standard >90 days → recommend Intelligent-Tiering
  • EBS gp2 → gp3 saves 20% (auto-recommendation)
  • EFS Infrequent Access saves 85% for cold data
  • Glacier retrieval costs can exceed storage costs (education)

Use Case: Storage tier optimization, lifecycle policies


3.7 Serverless Services​

Business Purpose: Break down serverless compute costs

Controller: costbreakup/ServerlessController

Services Covered: Lambda, API Gateway, Step Functions, SQS, SNS, SES, EventBridge

Cost Dimensions:

  • Lambda: Invocations, duration (GB-seconds), requests
  • API Gateway: Requests, data transfer
  • Step Functions: State transitions
  • SQS: Requests
  • SNS: Requests, notifications
  • SES: Emails sent

Business Rules:

  • Lambda memory >90% utilization → recommend increase
  • Lambda memory <30% utilization → recommend decrease
  • API Gateway REST vs HTTP API cost difference shown
  • SQS Long Polling recommended (reduces costs)

Use Case: Serverless cost optimization, Lambda rightsizing


3.8 Networking & Content Delivery​

Business Purpose: Break down networking service costs

Controller: costbreakup/NetworkingAndContentDeliveryController

Services Covered: CloudFront, Load Balancers (ALB/NLB/CLB), API Gateway, Route 53, VPC

Cost Dimensions:

  • CloudFront: Data transfer out, requests, invalidations
  • Load Balancers: LCU hours, data processed
  • API Gateway: Requests, caching
  • Route 53: Hosted zones, queries
  • VPC: NAT Gateway hours, data processed

Business Rules:

  • Classic Load Balancer → ALB/NLB migration saves 25%+
  • CloudFront caching reduces origin requests & costs
  • NAT Gateway alternatives (NAT instance, VPC endpoints)
  • Multiple small Load Balancers → consolidate

Use Case: Networking cost optimization, CLB migration


3.9 Security Services​

Business Purpose: Break down security service costs

Controller: costbreakup/SecurityController

Services Covered: WAF, GuardDuty, Shield, Secrets Manager, Certificate Manager

Cost Dimensions:

  • WAF: Web ACLs, rules, requests
  • GuardDuty: Data analyzed (GB)
  • Shield Advanced: Fixed fee + data transfer
  • Secrets Manager: Secrets stored, API calls

Business Rules:

  • WAF costs scale with traffic (per million requests)
  • GuardDuty volume discounts at 500 GB/day
  • Secrets Manager vs Parameter Store cost comparison

Use Case: Security cost management, service selection


3.10 Management & Governance​

Business Purpose: Break down management tool costs

Controller: costbreakup/ManagementAndGovernanceController

Services Covered: CloudWatch, CloudTrail, Systems Manager, Config, Backup

Cost Dimensions:

  • CloudWatch: Logs ingested, logs stored, metrics, alarms, dashboards
  • CloudTrail: Data events, management events
  • Config: Config items, rules
  • Backup: Storage, restore requests

Business Rules:

  • CloudWatch Logs Insights queries cost per GB scanned
  • Log retention policies reduce costs (30d default → 7d for debug logs)
  • CloudTrail data events expensive (use selectively)

Use Case: Reduce observability costs without losing visibility


3.11 Media Services​

Business Purpose: Break down media processing costs

Controller: costbreakup/MediaController

Services Covered: MediaLive, MediaConnect, MediaTailor, MediaPackage

Cost Dimensions:

  • MediaLive: Channel hours, output bitrate
  • MediaConnect: Source/output hours, data transfer
  • MediaTailor: Manifest requests, ad insertion

Business Rules:

  • MediaLive costs scale with bitrate and outputs
  • Standard channels cheaper than single-pipeline

Use Case: Media workflow cost optimization


3.12 Migration & Transfer​

Business Purpose: Break down migration service costs

Controller: costbreakup/MigrationAndTransferController

Services Covered: Database Migration Service (DMS), Data Sync, Transfer Family

Cost Dimensions:

  • DMS: Replication instance hours, storage, data transfer
  • DataSync: Data transferred (per GB)
  • Transfer Family: Protocol hours, data transfer

Business Rules:

  • DMS costs stop when replication complete
  • DataSync one-time vs ongoing sync cost difference

Use Case: Migration cost planning, ongoing sync optimization


Domain 4: CUDOS Dashboards​

(Covered in Use Case 6 above - S3 dashboard example)

Business Purpose: Pre-built dashboards following AWS best practices for specific services

Controllers:

  • cudos/S3DashboardController
  • cudos/DataTransferDashboardController
  • cudos/DatabaseDashboardController

Use Case: Quick insights without custom dashboard creation


Domain 5: Alerting​

5.1 Cost Alerts​

Business Purpose: Notify when costs exceed thresholds

Controller: alertsapi/CostAlertController

Alert Types:

  • Budget threshold (50%, 80%, 100%, 120%)
  • Anomaly detection (ML-based)
  • Service-level spike (>50% increase)
  • Account-level spike

Business Rules:

  • Alerts sent via email + Slack
  • Alert fatigue prevention: Max 1 alert per threshold per day
  • Anomaly detection requires 30+ days baseline

Use Case: Prevent budget overruns, catch cost spikes early


5.2 Daily Cost Reports​

Business Purpose: Daily summary of spending

Controller: alertsapi/DailyReportController

Report Contents:

  • Yesterday's total spend
  • Day-over-day change ($ and %)
  • Top 5 services by spend
  • Top 3 cost increases/decreases
  • Anomalies detected

Business Rules:

  • Sent every morning at 8 AM local time
  • Only sent on weekdays (skip weekends)
  • Opt-in per user

Use Case: Daily cost awareness, early detection


5.3 RI Utilization Alerts​

Business Purpose: Alert when RIs are underutilized

Controller: alertsapi/RiUtilizationAlertController

Alert Thresholds:

  • Warning: <80% utilization
  • Critical: <60% utilization

Business Rules:

  • Alerts sent weekly (not daily - avoid fatigue)
  • Recommendations included (modify, exchange, sell)

Use Case: Maximize RI ROI


5.4 RI Expiry Alerts​

Business Purpose: Notify before RIs expire

Controller: alertsapi/RiExpiryAlertController

Alert Schedule:

  • 90 days before expiry
  • 60 days before expiry
  • 30 days before expiry
  • Day of expiry

Business Rules:

  • Include renewal recommendation
  • Include utilization history
  • Include ROI of renewal

Use Case: Prevent savings loss from expired RIs


Domain 6: Recommendations​

6.1 AWS Native Recommendations​

Business Purpose: Surface AWS Cost Explorer recommendations

Controller: RecommendationController

Recommendation Types:

  • EC2 rightsizing (downsize over-provisioned)
  • RDS rightsizing
  • S3 storage class recommendations
  • RI purchase recommendations
  • Savings Plans recommendations
  • Idle resource detection

Business Rules:

  • Recommendations refreshed daily from AWS
  • Sorted by savings potential (high to low)
  • Implementation difficulty tagged (easy/medium/hard)

Use Case: Data-driven cost optimization


6.2 FinOps Recommendations​

Business Purpose: Custom recommendations based on FinOps best practices

Controller: finops/FinOpsRecommendationController

Recommendation Types:

  • Classic Load Balancer → ALB/NLB migration
  • EBS gp2 → gp3 migration
  • On-Demand → Spot instances
  • Idle resource detection (ELBs, EIPs, volumes)
  • S3 lifecycle policies
  • CloudWatch log retention optimization

Business Rules:

  • Recommendations based on usage patterns
  • ROI calculation included
  • Implementation guide linked

Use Case: Beyond AWS recommendations, custom optimizations


6.3 Monthly Recommendations Report​

Business Purpose: Curated top 10 recommendations each month

Controller: monthlyreport/ReportRecommendationController

Report Contents:

  • Top 10 cost-saving opportunities
  • Estimated annual savings
  • Implementation difficulty
  • Action items with recommended owners

Business Rules:

  • Sent first week of each month
  • Prioritized by savings / effort ratio
  • Tracks implementation status

Use Case: Monthly optimization focus, executive reporting


User Personas & Workflows​

Persona 1: FinOps Manager (Sarah)​

Responsibilities:

  • Monitor cloud spending
  • Generate financial reports
  • Identify cost savings
  • Manage budgets

Daily Workflow:

  1. Check daily cost report (email)
  2. Review any cost alerts
  3. Investigate anomalies
  4. Update savings tracker

Weekly Workflow:

  1. Review cost trends
  2. Check RI utilization
  3. Meet with team leads about spending
  4. Update forecasts

Monthly Workflow:

  1. Generate monthly billing report
  2. Present to executives
  3. Review recommendations
  4. Prioritize optimizations
  5. Track savings realized

Primary Lens Features Used:

  • Billing Console
  • Cost Alerts
  • Daily Reports
  • Cost Trends
  • Recommendations

Persona 2: Cloud Architect (Mike)​

Responsibilities:

  • Design cloud infrastructure
  • Make RI purchase decisions
  • Optimize resource sizing
  • Plan capacity

Daily Workflow:

  1. Check for new recommendations
  2. Monitor infrastructure costs
  3. Review rightsizing suggestions

Weekly Workflow:

  1. Analyze RI coverage
  2. Review RI utilization
  3. Evaluate new AWS services/pricing

Monthly Workflow:

  1. Review RI expiries
  2. Plan RI purchases
  3. Assess architecture costs
  4. Implement optimizations

Primary Lens Features Used:

  • RI Management (Coverage, Utilization, Inventory)
  • Recommendations
  • Cost Breakdowns (by service)
  • CUDOS Dashboards

Persona 3: DevOps Engineer (Alex)​

Responsibilities:

  • Troubleshoot cost spikes
  • Implement cost optimizations
  • Tag resources
  • Monitor infrastructure

Daily Workflow:

  1. Check alerts (cost, RI)
  2. Investigate any anomalies
  3. Review daily cost report

Weekly Workflow:

  1. Review recommendations
  2. Implement quick wins
  3. Update tags

Ad-Hoc:

  • Respond to cost alerts
  • Debug cost spikes
  • Generate reports for team

Primary Lens Features Used:

  • Cost Alerts
  • Daily Reports
  • Cost Breakdowns (detailed)
  • Cost Explorer (ad-hoc analysis)

Persona 4: Finance Manager (Lisa)​

Responsibilities:

  • Chargebacks/showbacks
  • Budget management
  • Financial compliance
  • Cost allocation

Daily Workflow:

  • Check budget vs actual
  • Review major transactions

Weekly Workflow:

  • Generate chargeback reports
  • Review tag compliance
  • Update allocations

Monthly Workflow:

  • Close books
  • Generate invoices
  • Audit tags
  • Reconcile with AWS bill

Primary Lens Features Used:

  • Billing Summary
  • Account-Wise Breakup
  • Tag Reports
  • Export capabilities

Persona 5: VP of Engineering (David)​

Responsibilities:

  • Overall cloud budget
  • Strategic decisions
  • Team accountability

Daily Workflow:

  • Check budget status dashboard

Weekly Workflow:

  • Review cost trends
  • Major spending reviews

Monthly Workflow:

  • Review monthly report
  • Cost review meeting
  • Approve major purchases

Primary Lens Features Used:

  • Billing Console (executive view)
  • Cost Trends
  • Budget Alerts
  • Monthly Reports

Persona 6: Storage Architect (Emily)​

Responsibilities:

  • Optimize storage costs
  • Design data lifecycle
  • Manage backups

Daily Workflow:

  • Monitor storage growth
  • Check backup costs

Weekly Workflow:

  • Review S3 dashboard
  • Analyze access patterns
  • Evaluate lifecycle policies

Monthly Workflow:

  • Storage cost optimization
  • Implement new lifecycle rules
  • Review storage class distribution

Primary Lens Features Used:

  • CUDOS S3 Dashboard
  • Storage Cost Breakup
  • Recommendations (S3 specific)

Business Logic Overview​

Cost Calculation Logic​

1. Cost Aggregation​

Process:

Raw Snowflake Data → Aggregate by dimensions → Apply filters → Calculate metrics

Dimensions:

  • Time (hourly, daily, monthly)
  • Service (EC2, S3, RDS, etc.)
  • Region (us-east-1, eu-west-1, etc.)
  • Account (123456789012)
  • Tags (Environment=prod, Team=engineering)
  • Resource (instance ID, bucket name)

Metrics:

  • Total cost
  • Cost change (period over period)
  • Average cost
  • Cost distribution (%)

2. Budget Tracking​

Formula:

Budget Utilization = (Actual Spend / Budget) * 100%
Projected EOY = (YTD Spend / Days Elapsed) * 365

Thresholds:

  • 50%: Information (on track)
  • 80%: Warning (monitor closely)
  • 100%: Alert (at budget)
  • 120%: Critical (over budget)

3. Savings Calculation​

RI Savings:

Savings = (On-Demand Cost - RI Cost) * Utilization %
Annual Savings = Monthly Savings * 12

Optimization Savings:

Potential Savings = Current Cost - Recommended Cost
Annual Potential = Potential Savings * 12

RI Business Logic​

1. Utilization Calculation​

Formula:

Utilization = (RI Hours Used / RI Hours Purchased) * 100%

Rules:

  • Partial hours round up
  • Unused hours = wasted money
  • Target: 95%+ utilization

2. Coverage Calculation​

Formula:

Coverage = (Usage Covered by RIs / Total Usage) * 100%

Recommendation:

  • Coverage < 50%: High RI purchase opportunity
  • Coverage 70-80%: Optimal (balance commitment vs flexibility)
  • Coverage > 90%: Over-committed (risky)

3. ROI Calculation​

Formula:

Annual Savings = (On-Demand Rate - RI Rate) * Annual Hours
Upfront Cost = RI Upfront Payment
ROI = (Annual Savings / Upfront Cost) * 100%
Payback Period = Upfront Cost / Monthly Savings

Decision Rule:

  • ROI > 100%: Great deal
  • ROI 50-100%: Good deal
  • ROI < 50%: Marginal, consider flexibility

Anomaly Detection Logic​

1. Statistical Method​

Formula:

Mean = Average cost over last 30 days
Std Dev = Standard deviation of last 30 days
Threshold = Mean + (2 * Std Dev)
Anomaly if: Today's Cost > Threshold

Example:

  • Mean = $5,000/day
  • Std Dev = $500
  • Threshold = $5,000 + (2 * $500) = $6,000
  • Today = $7,200 → ANOMALY (44% over threshold)

2. Contextual Anomalies​

Rules:

  • Weekend anomaly: Cost spike on Saturday/Sunday (unusual)
  • End-of-month anomaly: Spike on last day (expected for batch jobs)
  • Holiday anomaly: Low usage on Dec 25 (expected)

Context Matters: $2K spike on Dec 24 = normal (year-end processing). $2K spike on July 15 = investigate.


Tag-Based Cost Allocation​

1. Allocation Rules​

Direct Allocation:

If resource has tag "Department=Engineering"
Then: Allocate 100% of cost to Engineering

Proportional Allocation (for shared resources):

Shared Service Cost = $10,000
Engineering Usage = 60%
Marketing Usage = 40%
Engineering Allocation = $10,000 * 60% = $6,000
Marketing Allocation = $10,000 * 40% = $4,000

Unallocated Costs:

If resource has no "Department" tag
Then: Allocate to "Unallocated" bucket
Action: Flag for tagging

2. Tag Hierarchy​

Precedence:

  1. Department (highest priority)
  2. Team
  3. Project
  4. Environment (lowest priority)

Example:

  • Resource tagged: Department=Engineering, Environment=prod
  • Allocated to: Engineering (not prod, because Department has precedence)

Value Streams​

Value Stream 1: Cost Visibility → Decision Making​

Input: Raw AWS billing data (Snowflake)

Processing:

  1. Aggregate costs by dimensions
  2. Cache results (Redis)
  3. Present in dashboards
  4. Highlight anomalies

Output: Actionable insights (where money is spent)

Business Value: Informed decisions on resource allocation

Metrics:

  • Time to insight: <5 seconds (dashboard load)
  • Data freshness: <24 hours

Value Stream 2: Cost Spike → Investigation → Resolution​

Input: Anomaly detected (ML + thresholds)

Processing:

  1. Send alert (email, Slack)
  2. User drills down (Cost Explorer)
  3. Identify root cause (service → resource)
  4. Take action (terminate, downsize, fix bug)

Output: Cost spike resolved

Business Value: Prevent budget overruns (avg $50K/incident)

Metrics:

  • Time to detection: <4 hours
  • Time to resolution: <24 hours

Value Stream 3: RI Opportunity → Purchase → Savings​

Input: High On-Demand spend

Processing:

  1. Analyze coverage (RiCoverageController)
  2. Generate recommendations (AWS API)
  3. Validate ROI calculation
  4. Present business case
  5. Purchase RIs (AWS Console)
  6. Track savings realized

Output: 30-75% cost reduction on RI-covered usage

Business Value: $100K+ annual savings per $1M On-Demand spend

Metrics:

  • Recommendation accuracy: 90%+ (predicted vs actual savings)
  • RI utilization post-purchase: >90%

Value Stream 4: Unoptimized Resources → Recommendations → Actions → Savings​

Input: Inefficient resource usage

Processing:

  1. AWS recommendations + FinOps rules
  2. Calculate savings potential
  3. Rank by ROI
  4. Present to users
  5. Users implement
  6. Measure savings

Output: Optimized infrastructure

Business Value: 20-40% total cost reduction

Metrics:

  • Recommendations implemented: 60% within 30 days
  • Savings realization: 85% of projected

Value Stream 5: Monthly Close → Reporting → Chargeback​

Input: Complete monthly billing data

Processing:

  1. Generate billing summary
  2. Allocate costs by tags
  3. Create chargeback reports
  4. Export to finance systems
  5. Distribute to stakeholders

Output: Monthly financial close complete

Business Value: Accurate cost allocation, team accountability

Metrics:

  • Close time: 2 days (vs 10 days manual)
  • Allocation accuracy: 92%+ (tag coverage)

Summary​

The AWS Lens module provides comprehensive functional capabilities for cloud financial management:

  • 6 Core Business Capabilities: Visibility, RI Management, Forecasting, Optimization, Reporting, Alerting
  • 40 REST Controllers: Exposing 100+ API endpoints
  • 6 User Personas: FinOps Managers, Cloud Architects, DevOps Engineers, Finance Managers, Executives, Storage Architects
  • 12 AWS Service Breakdowns: Detailed cost analysis per service category
  • 5 Value Streams: End-to-end business processes delivering measurable value

Business Outcomes:

  • 20-40% cloud cost reduction
  • 30-75% savings via RI optimization
  • 85%+ budget forecast accuracy
  • <24 hour cost anomaly resolution
  • 92%+ cost allocation accuracy

Next Steps:


Document Version: 1.0 Last Updated: October 25, 2025