Back

The practical way to optimise cloud spend with human–AI collaboration

December 10, 2025

Cloud bills don’t shrink on their own.

As teams ship features and scale environments, costs rise, and visibility drops.

With the right structure, and AI assisting (not replacing) engineers, waste becomes easier to spot and fix.

This guide shows a practical human-in-the-loop framework to understand where money goes and what to optimise next.

🧰 Preparation: Tools, Setup, and Access

Before starting, set up your environment so both you and your AI assistant can safely analyze and optimize AWS costs.

These steps ensure visibility, security, and smooth execution.

1. Install the AWS CLI

Use the AWS Command Line Interface (CLI) to interact with AWS securely.

Mac:

brew install awscli

Linux (Debian/Ubuntu):

sudo apt update
sudo apt install awscli -y

Windows (PowerShell):

msiexec.exe /i <https://awscli.amazonaws.com/AWSCLIV2.msi>

Verify installation

aws --version

Expected output example:

aws-cli/2.17.28 Python/3.11.7 Linux/5.15.0 botocore/2.14.28

2. Configure AWS Credentials

Authenticate your CLI session:

aws configure

Provide your Access Key, Secret Key, region, and preferred output format (json).

Verify identity:

aws sts get-caller-identity

3. Create a Dedicated IAM Role or User

Grant least-privilege permissions for analysis and reporting.

Recommended Policy:

{
 "Version": "2012-10-17",
 "Statement": [
   {
     "Effect": "Allow",
     "Action": [
       "ce:*",
       "budgets:*",
       "cloudwatch:GetMetricData",
       "ec2:Describe*",
       "rds:Describe*",
       "s3:GetBucket*",
       "iam:List*",
       "pricing:GetProducts"
     ],
     "Resource": "*"
   }
 ]
}

Attach to a dedicated user/role (e.g., ai-cost-optimizer).

4. Export Cost Data for Analysis

If direct access isn’t possible:

  1. Go to AWS Cost Explorer → Reports
  2. Select Last 30 Days
  3. Click Export CSV
  4. Save as aws_cost_report.csv

Upload the file into your analysis tool or AI assistant.

Prompt example:

Analyze this CSV and summarize key cost drivers.
Provide optimization ideas, focusing on rightsizing and idle resources.
Constraints: 99.9% uptime, no data deletion.

Step 1: Establish baselines

Cost optimisation starts with clarity, not action.

Before changing anything:

  • Confirm billing permissions
  • Review 30-day trends
  • Export per-service breakdowns
  • Capture environment-level data (prod, staging, workers)

This forms your baseline snapshot for future comparisons. Think of this as architecture mapping for your cloud spend.

Step 2: Craft effective AI prompts

AI can analyse large cost datasets quickly,

but only if you provide context.

A strong prompt includes:

  • Scope (which environments, period, or services)
  • Constraints (uptime requirements, compliance rules)
  • Deliverables (summary, optimisation actions, risks)

Prompt example:

Analyze AWS costs for the last 30 days.
Identify underutilized resources and rightsizing opportunities.
Suggest actions that maintain 99.9% uptime.

Step 3: From insight to decision

AI suggestions require human judgment.

Treat AI outputs as recommendations, not instructions.

Each recommendation should be evaluated by:

  • Impact: How much will we save?
  • Risk: Could stability be affected?
  • Effort: How complex is implementation?
  • Reversibility: Can we roll back safely?

Maintain a simple log of decisions.

It creates transparency and ensures every change has an owner.

Step 4: Team collaboration

Share findings with DevOps or Infrastructure leads.

Use shared documentation tools (Notion, Confluence, Jira) to:

  • Discuss trade-offs
  • Approve or defer changes
  • Record impact metrics

This transforms optimization into a transparent, team-owned process.

Step 5: Implementation

Once approved, have the AI generate:

  • CLI commands
  • Console navigation paths
  • Verification and rollback steps

Apply incrementally.

After each change, validate via CloudWatch, functional testing, and application monitoring.

Step 6: Validate savings

Measure outcomes using:

  • Cost Explorer daily spend trend
  • CloudWatch utilization metrics
  • Comparison snapshots (Before vs. After)

If performance or cost deviates unexpectedly, rollback and adjust.

Step 7: Keep Iterating

Optimization is not a one-time event, make it continuous.

  • Revisit reports quarterly
  • Automate recurring checks
  • Update prompts with new AWS services

Document outcomes for future engineers to reference.

📘 Case study: Practical applications at Itsavirus

1️⃣ Cloud cost optimisation & rightsizing

During a multi-environment review, the team leveraged Cursor AI to analyze spend across staging, production, and worker services.

Focus Areas:

  • Identifying underutilized compute resources
  • Suggesting right instance sizes (CPU/memory balance)
  • Highlighting idle or duplicate resources across environments
  • Validating cost-saving scenarios with minimal operational risk

Outcome Highlights:

  • Achieved measurable monthly savings (approx. 25–30%)
  • Improved compute utilization efficiency
  • Introduced consistent tagging and environment mapping for clearer accountability
  • Established a repeatable AI-driven process for monthly cost reviews

This phase proved that combining AI insights with engineer validation yields sustainable, low-risk savings without affecting service reliability.

2️⃣ Mapping legacy infrastructure

The second project targeted a legacy AWS account with minimal documentation and unclear ownership across services.

The AI was used not to optimize costs directly, but to understand the architecture:

  • Discover hidden or forgotten services
  • Categorize environments and dependencies
  • Identify unused or orphaned resources
  • Generate structured documentation for each service and region

Outcome Highlights:

  • Transformed an unstructured, messy AWS account into a clear architecture map
  • Revealed multiple unused components for later cleanup
  • Created baseline infrastructure documentation for internal auditing and ISO 27001 readiness
  • Reduced uncertainty and dependency on tribal knowledge

This use case showed how AI can act as a cloud interpreter, turning opaque environments into understandable, actionable documentation — a foundation for future optimizations.

The takeaway

AI doesn’t replace engineers, it increases their leverage.

It turns raw billing data into structured insights and supports clearer decisions.

It helps teams move from guesswork to predictable execution.

With human–AI collaboration, organisations gain:

  • Transparent and predictable cloud spend
  • Continuous efficiency improvements
  • Shared operational knowledge

Cloud optimisation is not a one-time activity; it becomes part of the operating model.

Need clarity on your cloud costs? Talk to our team here.

Latest insights

A sharp lens on what we’re building and our take on what comes next.

See more
AI governance checklist: 10 questions every leader must answer before adopting AI

Latest insights

A sharp lens on what we’re building and our take on what comes next.

See more
Responsible AI: the 7 non-negotiables
Why most AI projects fail, and how to avoid becoming one of them
Strategy Before Software: The Real Foundation of Digital and AI Transformation

Latest insights

A sharp lens on what we’re building and our take on what comes next.

See more
Developing the Factum app
Building Barter, revolutionizing influencer marketing
Why is Amsterdam one of the leading smart cities in the world?

Latest insights

A sharp lens on what we’re building and our take on what comes next.

See more
Workshop : From Idea to MVP
Webinar: What’s next for NFT’s?
Webinar: finding opportunities in chaos

Latest insights

A sharp lens on what we’re building and our take on what comes next.

See more
How we helped Ecologies to turn survey results into reliable, faster reports using AI
How to deal with 1,000 shiny new tools
Develop AI Integrations with Itsavirus