AWS Solutions Architect Project (Cost Optimization Pillar) – Automated Cost Management – Part 2

After setting up a wasteful resource, in this part we will analyze the cost inefficiencies systematically using both immediate checking and data-driven analysis. This mirrors real-world cost optimization where some waste is immediately visible, while deeper insights require time and proper monitoring tools. There are 3 levels of analysis with each of its action recommendations:

Level 1: Immediate Validation (Quick Wins Optimization) – Requires 1 to 2 Hours Data

The purpose is to identify obvious waste that generates immediate cost savings without requiring extensive data collection.

Step 1: Start Checking The Unattached Resources (Directly / Immediately Waste)

Unattached resources provide 100% waste with zero business risk – they’re not being used by anything, so deleting them has no operational impact. Previously we have setup unattached EBS volumes and elastic IP that we can inspect directly

Unattached EBS Volumes

In real AWS environments, volumes often get orphaned when:

  • Instances are terminated without deleting attached volumes
  • Volumes are created during troubleshooting and forgotten
  • Automated processes create volumes but fail to clean up after errors

Let’s detect them:

  • Go to EC2 Console → Volumes
  • Filter by State: “available” (unattached)
  • Look for: Your 3 volumes (50GB, 50GB, 100GB) with “CostManager” tag
  • Immediate Cost: ~$20/month waste

The indicators of unattached EBS are:

  • Volume state shows “available” instead of “in-use”
  • No recent snapshot activity (indicates no one is managing the data)

Unattached Elastic IPs

Elastic IPs are free when attached to running instances, but cost $0.005/hour (~$3.60/month) when unattached. Organizations usually:

  • Reserve IPs for planned instances that never get created
  • Terminate instances but forget to release the associated IPs
  • Over-allocate IPs “just in case” for future projects

Let’s detect them:

  • Go to EC2 Console → Network & Security → Elastic IPs
  • Check “Associated Instance ID” column: Any showing “-” are unattached
  • Look for: Your 2 unattached EIPs with “CostManager” tag
  • Immediate Cost: ~$7.20/month waste

In production environments, set up automated alerts when EIPs remain unattached for more than 1 hour – this catches mistakes immediately.

Step 2: Over-Provisioned Resources Analysis

Identify resources that are larger than necessary for their actual workload. This requires understanding the business requirement vs. actual usage.

EC2 Instance Right-Sizing Assessment

Over-provisioning happens because:

  • “Better safe than sorry” mentality – developers choose larger sizes to avoid performance issues
  • Copy-paste infrastructure – using previous project specs without analyzing requirements
  • Lack of monitoring – no visibility into actual resource utilization after deployment

Let’s resize them

  • Go to EC2 Console, select Instances
  • Check current sizing as per below:
    • Instance 1: t3.small (1 vCPU, 2 GB RAM) – $15.18/month
    • Instance 2: t3.medium (2 vCPU, 4 GB RAM) – $30.37/month
  • Assess workload requirements: Simple static website with minimal processing needs
  • Compare with appropriate sizing: t3.micro (1 vCPU, 1 GB RAM) – $7.59/month would be sufficient
  • Potential Savings:
    • t3.mall → t3.micro: ~50% savings (~$15/month)
    • t3.medium → t3.micro: ~75% savings (~$25/month)

Step 3: Basic CloudWatch Monitoring (Available Within 1-2 Hours)

Use AWS’s built-in monitoring to validate the right-sizing hypothesis with actual usage data, even with limited historical data (just 1-2 hours). AWS automatically collects basic metrics for all EC2 instances every 5 minutes at no charge. Even with 1-2 hours of data, we can identify severe over-provisioning. The advantage of this method is that it requires no additional cost.

Let’s analyze the following key metrics:

  • Go to EC2 Console → Instances
  • Select both instance → Monitoring tab
  • Observe the following metrics:
    • CPU Utilization (%) – Should remain very low (<5%) for a simple web server
    • Network In/Out (bytes) – Will show small spikes when we access the site but otherwise minimal traffic
    • Disk I/O and CPU Credit Balance – Useful for confirming that the instance isn’t under or over-utilized

After analyzing both EC2 instances, we can summarize:

  • EC2 CPU: Very low (<5%) for both instances
  • Network traffic: Minimal unless you actively generate load

In production environments, we need at least 2 weeks of data before making sizing changes, but obvious over-provisioning can be identified immediately with level 1.

Step 4: Create Cost Impact Assessment

ResourceCountCost Impact (Monthly)
Unattached EBS Volumes3~$20
Unattached Elastic IPs2~$7.20
Over-provisioned EC22~$25.00
Total monthly waste~$52.20

Level 2: Data-Driven Validation – Requires 24 to 48 Hours Data

Once we have 24+ hours of data, we can use AWS tools to validate our manual findings with actual cost and performance data.

Tool #1: Setup AWS Cost Explorer (At Least After 24 Hours)

  • Go to Billing Console, select Cost Explorer, click Launch Cost Explorer
  • Click Create Report: Last 7 days, group by service, filter by tag: “CostManager”
  • The result will be something like this:

Tool #2: AWS Trusted Advisor (Depends on Support Plan)

  • Go to Support Console, select Trusted Advisor, select Cost Optimization
  • The result will be something like this:
    • Low Utilization EC2 Instances: Your t3.small and t3.medium instances
    • Unattached EBS Volumes: Your 3 volumes costing $20/month
    • Unassociated Elastic IPs: Your 2 IPs costing $7.20/month

Full features require Business/Enterprise support plans. Basic support has limited checks.

Tool #3: CloudWatch Extended Analysis (At Least After 24 Hours)

  • Go to CloudWatch Console, select EC2 Metrics, CPU Utilization
  • The result will be something like this:
    • Expected: Consistently <5% utilization confirming over-provisioning
    • Conclusion: Statistical proof that t3.micro sizing would be sufficient

Level 3: Advance Tools (for Reference Only)

For using these enterprise-level tools that are only available for long-term cost optimization (to use them, it requires 2+ weeks of data). Therefore, this part is out of the scope of this project.

Tool #1: AWS Compute Optimizer

Uses machine learning to analyze 14+ days of usage and recommend optimal instance types.

  • Setup: Console → Compute Optimizer → Opt-in (free)
  • Expected Results: Would recommend t3.micro for both instances with high confidence
  • Business Value: Provides statistical confidence for right-sizing decisions

Tool #2: Advanced Trusted Advisor (Business/Enterprise Support)

  • Detailed utilization patterns and confidence ratings
  • Historical analysis and cost impact projections
  • Implementation guidance with risk assessments

Tool #3: Long-term Cost Management

  • Cost forecasting with Cost Explorer
  • Reserved Instance recommendations for stable workloads
  • Savings Plans analysis for commitment-based discounts
  • Automated optimization with AWS Cost Anomaly Detection

Summary

So far we have outlined 3 steps of inefficient resources detection based on the periods of deployed resources:

  • Hour 1-2 (Immediate Detection):
    • Identify $50+ monthly waste through manual resource audit
    • Understand common waste patterns in AWS environments
    • Build confidence in cost optimization fundamentals
    • Create business case for optimization investment
  • Day 2-3 (Data-Driven Validation):
    • Validate findings with AWS native cost tools
    • Understand billing mechanics and cost allocation
    • Learn professional-grade analysis techniques
    • Develop stakeholder communication skills
  • Week 2+ (Strategic Optimization):
    • Implement sophisticated monitoring and alerting
    • Develop comprehensive optimization strategies
    • Establish ongoing cost management processes
    • Build enterprise-level cost optimization capabilities

In the next part, we will be working on the optimization implementation phase, where we will focus on systematically eliminating the waste we’ve identified, starting with zero-risk cleanups (unattached resources) and progressing to more complex optimizations (right-sizing and automation).