v2026.1 Open Portal ↗
On this page

Cloud Optimization

Optimization Engine

The StackFlow Cloud Optimization engine analyzes your cloud resource utilization and spend data to identify cost savings opportunities. It combines AWS Cost Explorer data, CloudWatch metrics, and AI analysis to provide ranked, actionable recommendations with estimated savings amounts and implementation risk levels.

⚙️ Minimum Requirements
  • AWS Cost Explorer: Cost Explorer enabled in connected accounts with at least 7 days of billing data
  • AWS Compute Optimizer: Opt-in required in each connected account for rightsizing recommendations
  • DynamoDB: StackFlow_OptimizationRecommendation table for storing and tracking recommendations
  • IAM: StackFlowDiscoveryRole with ce:GetRightsizingRecommendation, compute-optimizer:GetEC2InstanceRecommendations

Right-Sizing Recommendations

Right-sizing analyzes CPU, memory, and network utilization over the past 14 days to identify over-provisioned resources. For example, an EC2 instance using less than 10% CPU on average is flagged as a right-sizing candidate with a recommendation to downsize to a smaller instance type.

Resource TypeData SourceRecommendation TypeEstimated Savings
EC2 instancesCloudWatch CPU/Mem/NetDownsize instance typeUp to 60%
RDS instancesCloudWatch + Performance InsightsDownsize instance classUp to 50%
LambdaCloudWatch DurationReduce memory allocationUp to 40%
ElastiCacheCloudWatch Memory+ConnectionsDownsize node typeUp to 30%
Risk Assessment: Each recommendation includes a risk level (Low/Medium/High). Always review High-risk recommendations carefully before implementing — they may involve production systems where performance degradation would impact SLAs.

Idle Resource Detection

Idle resource detection identifies resources with near-zero utilization that may have been forgotten. Common findings include: stopped EC2 instances with attached EBS volumes (paying for storage), unused Elastic IP addresses (paying for unattached EIPs), empty S3 buckets with versioning enabled (accumulating old versions), and idle load balancers with no registered targets.

Savings Plans Analysis

The savings plans analysis compares your current on-demand spend against the cost of committing to 1-year or 3-year Savings Plans or Reserved Instances. The analysis uses your 30-day usage history to calculate the optimal commitment level that maximizes savings while minimizing over-commitment risk.

Implementing Recommendations

Recommendations can be implemented directly from the StackFlow console (for supported actions) or exported as an implementation plan. For each recommendation, StackFlow can create a Change record with the implementation details, risk assessment, and rollback plan pre-populated. This ensures all cloud changes go through the standard CAB approval process.

curl -X POST https://your-instance.stackflow-tech.com/prod/api/cloud/optimization/recommendations/rec_abc123/implement   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{"create_change_record": true, "change_type": "standard", "scheduled_date": "2026-05-25T02:00:00Z"}'