# Cloud Optimization Actor (`harshit-paneri/cloud-optimisation-actor`) Actor

Analyzes cloud resources across providers to identify cost-saving and performance improvements. Collects utilization and billing metrics, detects underutilized or overprovisioned resources, and returns prioritized actionable recommendations with estimated savings.

- **URL**: https://apify.com/harshit-paneri/cloud-optimisation-actor.md
- **Developed by:** [Harshit Paneri](https://apify.com/harshit-paneri) (community)
- **Categories:** Developer tools, Open source
- **Stats:** 3 total users, 2 monthly users, 96.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## ☁️ Cloud Optimization Actor - Save Money on Your Cloud Bill

Are you spending too much money on AWS, Azure, or Google Cloud? This Actor automatically finds wasted resources and tells you exactly how to save money!

### 🤔 What Does This Do?

Imagine you're paying for 10 cloud servers, but only 3 of them are actually being used. The other 7 are just sitting there, costing you money every month. **This Actor finds those wasted resources and tells you how much money you can save.**

#### Real Example:

```
Your Current Bill: $5,000/month
After Optimization: $3,200/month
YOU SAVE: $1,800/month = $21,600/year! 💰
```

### ✨ What You'll Get

After running this Actor, you'll see:

1. **📊 Complete List of Your Cloud Resources**
   - All your servers, databases, and storage
   - How much each one costs per month
   - How much each one is actually being used

2. **💡 Money-Saving Recommendations**
   - "Downsize this server to save $350/month"
   - "Delete this unused database to save $200/month"
   - "Switch to cheaper plan to save $180/month"

3. **📈 Beautiful Charts and Graphs**
   - See which resources are wasted
   - Visualize your potential savings
   - Easy-to-understand pie charts and graphs

4. **🎯 Priority Ranking**
   - HIGH Priority: Big savings, do this first!
   - MEDIUM Priority: Good savings, plan for next month
   - LOW Priority: Small savings, nice to have

### 🚀 How to Use (Step-by-Step)

#### Step 1: Get Your Cloud Credentials

**For AWS (Amazon Web Services):**

1. Log into your AWS Console
2. Go to IAM → Users → Create User
3. Give it read-only permissions (CloudWatch, EC2, RDS)
4. Copy your Access Key ID and Secret Access Key

**Don't worry!** This Actor only READS your data. It cannot delete or change anything.

#### Step 2: Run This Actor

1. **Click the "Try for free" button** at the top of this page

2. **Fill in the form:**

   ```
   Cloud Providers: Select "aws" (or azure/gcp)
   Resource Types: Select "EC2" (or RDS, DynamoDB)
   Analysis Period: Choose "4 weeks"
   AWS Region: Select your region (e.g., us-east-1)
   AWS Configuration: Paste this:
   {
     "accessKeyId": "YOUR_KEY_HERE",
     "secretAccessKey": "YOUR_SECRET_HERE"
   }
   ```

3. **Click "Start"**

#### Step 3: Wait (Usually 1-2 Minutes)

The Actor will:

- Connect to your AWS account
- Scan all your resources
- Analyze usage for the past 4 weeks
- Calculate potential savings
- Generate recommendations

#### Step 4: View Your Results

You'll see **4 tabs** with your results:

##### 📊 **Overview Tab**

A complete table showing all your resources:

| Resource Name | Type | Usage | Cost/Month | Potential Savings | Priority |
|---------------|------|-------|------------|-------------------|----------|
| web-server-1 | EC2 | 12% | $780 | $350 | HIGH |
| database-prod | RDS | 75% | $520 | - | - |
| cache-server | ElastiCache | 38% | $600 | $150 | MEDIUM |

##### 💡 **Recommendations Tab**

Only shows resources where you can save money:

| What to Do | Resource | Savings | Priority |
|------------|----------|---------|----------|
| Downsize from m5.2xlarge to m5.xlarge | web-server-1 | $350/month | HIGH |
| Reduce cache nodes from 3 to 2 | cache-server | $150/month | MEDIUM |

##### ☁️ **Resources Tab**

Simple list of all your cloud resources with usage percentages

##### 📈 **Visual Analytics Tab**

Beautiful charts showing:

- Pie chart of underutilized vs optimized resources
- Bar chart of potential savings
- Usage vs capacity graphs

### 💰 How Much Can You Save?

**Typical savings:**

- Small companies (10-20 servers): $500-$2,000/month
- Medium companies (50-100 servers): $3,000-$10,000/month
- Large companies (200+ servers): $15,000-$50,000/month

**Common waste found:**

- ❌ Servers running 24/7 but only used 8 hours/day → **Save 60%**
- ❌ Oversized databases (more capacity than needed) → **Save 40%**
- ❌ Test servers left running after testing → **Save 100%**
- ❌ Old snapshots and backups never deleted → **Save 30%**

### 🔐 Is This Safe?

**YES!** This Actor is 100% safe:

✅ **Read-Only Access**: Only looks at your data, cannot change anything\
✅ **No Deletions**: Cannot delete or modify your resources\
✅ **Secure Credentials**: Your keys are encrypted and never stored\
✅ **Open Source**: You can see exactly what the code does

The Actor needs the same permissions as someone just "looking" at your AWS dashboard.

### 📋 What You Need

#### For AWS:

- ✅ AWS Access Key ID
- ✅ AWS Secret Access Key
- ✅ Read permissions for EC2, RDS, CloudWatch

#### For Azure:

- ✅ Subscription ID
- ✅ Service Principal credentials
- ✅ Read permissions for resources

#### For Google Cloud (GCP):

- ✅ Project ID
- ✅ Service Account key (JSON)
- ✅ Read permissions for Compute Engine

### 🎯 Who Should Use This?

**Perfect for:**

- 💼 Startup founders watching every dollar
- 🏢 IT managers managing cloud budgets
- 👨‍💻 DevOps teams optimizing infrastructure
- 📊 Finance teams tracking cloud spending
- 🎓 Anyone paying a cloud bill and wondering "why so high?"

**You'll love this if you:**

- Want to reduce your cloud bill
- Don't have time to manually check every resource
- Need to show your boss where money is being wasted
- Want clear, actionable recommendations
- Prefer visual charts over spreadsheets

### ❓ Common Questions

#### "Will this break anything?"

**No!** It's read-only. Think of it like checking your bank balance - you're just looking, not spending.

#### "How accurate are the savings estimates?"

Very accurate! We analyze **real usage data** from the past 4-8 weeks, not guesses.

#### "Do I need to be technical?"

**Not at all!** Just copy-paste your credentials and click Start. The results are easy to understand with simple language and charts.

#### "How often should I run this?"

**Once a month** is perfect. New waste accumulates as you add resources and change usage patterns.

#### "Can I try it for free?"

**Yes!** Apify gives you free credits to test. No credit card needed to start.

#### "What if I don't use AWS?"

We support **Azure** and **Google Cloud (GCP)** too! Just select your provider and add the right credentials.

### 📖 Quick Start Guide

#### 5-Minute Setup:

**1. Get Your AWS Keys** (2 minutes)

- Log into AWS Console
- Create a read-only IAM user
- Copy the Access Key and Secret Key

**2. Run the Actor** (1 minute)

- Click "Try it"
- Paste your credentials
- Click "Start"

**3. View Results** (2 minutes)

- Check the Overview tab
- Read the recommendations
- Calculate your total savings

**4. Implement Changes** (optional)

- Follow the HIGH priority recommendations first
- Start with the easiest changes
- Track your savings!

### 💡 Example Use Cases

#### Use Case 1: Startup Reducing Costs

**Problem:** $4,000/month AWS bill seems high for a small app\
**Solution:** Found 5 servers running 24/7 but only used during business hours\
**Result:** Implemented auto-scheduling → Saved $1,800/month (45%)

#### Use Case 2: E-commerce Site Optimization

**Problem:** Database costs growing every month\
**Solution:** Found oversized RDS instance at 25% utilization\
**Result:** Downsized database → Saved $600/month

#### Use Case 3: Development Team Cleanup

**Problem:** Test environments left running after projects ended\
**Solution:** Found 8 unused EC2 instances still running\
**Result:** Deleted unused resources → Saved $2,400/month

### 📊 Sample Output

After running the Actor, you'll see something like this:

```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  CLOUD OPTIMIZATION SUMMARY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Total Resources Found: 15
Current Monthly Cost: $4,200
Potential Savings: $1,260
Savings Percentage: 30%

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  TOP RECOMMENDATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔴 HIGH PRIORITY

1. Downsize web-server-prod-1
   Type: EC2
   Current: m5.2xlarge ($780/month)
   Recommended: m5.xlarge ($430/month)
   💰 SAVE: $350/month
   Why: Only using 12% CPU

2. Delete test-db-old
   Type: RDS
   Current: db.m5.large ($520/month)
   Recommended: Delete (not used in 8 weeks)
   💰 SAVE: $520/month
   Why: Zero traffic

🟡 MEDIUM PRIORITY

3. Switch to Reserved Instance
   Type: EC2 - api-server-1
   💰 SAVE: $250/month
   Why: Runs 24/7, perfect for RI

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Total Potential Savings: $1,120/month
Annual Savings: $13,440/year 🎉

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```

### 🎁 What Makes This Different?

| Other Tools | This Actor |
|-------------|------------|
| Complex dashboards | Simple, clear recommendations |
| Need cloud expertise | Anyone can understand |
| Generic advice | Specific actions for YOUR resources |
| Just show data | Tell you WHAT to do and HOW MUCH you'll save |
| Expensive ($99+/month) | Pay only for what you use (pennies per run) |

### 🛠️ Technical Details (For Developers)

**What it analyzes:**

- EC2 Instances (CPU, Network, Disk usage)
- RDS Databases (Connections, CPU, Storage)
- DynamoDB Tables (Read/Write capacity)
- ElastiCache (Memory, CPU, Connections)

**Data sources:**

- CloudWatch metrics (4-8 weeks of real data)
- Resource metadata (instance types, sizes)
- Current pricing (updated monthly)

**Recommendations based on:**

- Industry best practices
- Cost-benefit analysis
- Performance requirements
- Risk assessment

### 📞 Support

**Questions?**

- Check the [Apify Documentation](https://docs.apify.com)
- Join [Apify Discord](https://discord.com/invite/jyEM2PRvMU)
- Email: support@example.com

### 📝 License

Apache-2.0 - Free to use for commercial and personal projects

***

### 🚀 Ready to Save Money?

**Click the "Try it" button above and start optimizing your cloud costs in 5 minutes!**

**Your wallet will thank you!** 💰

***

### 🏆 Success Stories

> "Saved $18,000/year by finding unused resources we forgot about!" - Tech Startup

> "The visual charts made it easy to convince management to implement changes." - DevOps Engineer

> "Paid for itself 100x over in the first month!" - SaaS Company

> "Finally understand where our cloud money is going." - Small Business Owner

***

**Last Updated:** December 2025\
**Version:** 0.4\
**Status:** ✅ Production Ready

# Actor input Schema

## `cloudProviders` (type: `array`):

Select which cloud providers to analyze

## `resourceTypes` (type: `array`):

Types of resources to analyze (e.g., EC2, RDS, DynamoDB, etc.)

## `analysisWeeks` (type: `string`):

Number of weeks of historical data to analyze

## `awsRegion` (type: `string`):

Select AWS region to analyze

## `awsConfig` (type: `object`):

AWS credentials (JSON object with accessKeyId and secretAccessKey)

## `azureConfig` (type: `object`):

Azure-specific settings (JSON object)

## `gcpConfig` (type: `object`):

Google Cloud Platform-specific settings (JSON object)

## Actor input object example

```json
{
  "cloudProviders": [
    "aws"
  ],
  "resourceTypes": [
    "EC2"
  ],
  "analysisWeeks": "4",
  "awsRegion": "us-east-1",
  "awsConfig": {
    "accessKeyId": "YOUR_AWS_ACCESS_KEY",
    "secretAccessKey": "YOUR_AWS_SECRET_KEY"
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Complete view of all resources and recommendations

## `recommendations` (type: `string`):

Cost optimization recommendations with potential savings

## `resources` (type: `string`):

All analyzed cloud resources with utilization metrics

## `visualReport` (type: `string`):

Interactive charts and graphs (optional)

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "awsConfig": {
        "accessKeyId": "YOUR_AWS_ACCESS_KEY",
        "secretAccessKey": "YOUR_AWS_SECRET_KEY"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("harshit-paneri/cloud-optimisation-actor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "awsConfig": {
        "accessKeyId": "YOUR_AWS_ACCESS_KEY",
        "secretAccessKey": "YOUR_AWS_SECRET_KEY",
    } }

# Run the Actor and wait for it to finish
run = client.actor("harshit-paneri/cloud-optimisation-actor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "awsConfig": {
    "accessKeyId": "YOUR_AWS_ACCESS_KEY",
    "secretAccessKey": "YOUR_AWS_SECRET_KEY"
  }
}' |
apify call harshit-paneri/cloud-optimisation-actor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,harshit-paneri/cloud-optimisation-actor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/A0UxG7YhO8yLPgfR1/builds/QtoE1OhcKqghrdfcI/openapi.json
