Documentation

Cloudlink Documentation

How to connect an AWS account, what Cloudlink checks, and how to use the API.

Cloudlink is a cost monitoring tool for AWS. You connect an AWS account by deploying a CloudFormation template that creates one read-only IAM role. Cloudlink then scans the account on a schedule, records your AWS costs by service, and reports what it finds: idle or unattached resources, risky settings, and cost increases.

Findings come with a recommendation and, where Cloudlink can estimate one, a monthly saving. Your team decides what to change and makes the change in AWS. Cloudlink does not change anything in your account.

Cloudlink can also compare a service's cost before and after a deploy event you send from CI, so a cost increase can be tied to the deploy that came before it. That feature is still in development; see Cost data.


What Cloudlink covers today

Cloudlink works with AWS only. In each connected account it checks:

  • EC2 instances — running instances with low average CPU over the last 7 days (from CloudWatch)
  • EBS volumes — volumes that are not attached to any instance
  • RDS database instances — stopped, publicly accessible, unencrypted, no automated backups, or not Multi-AZ
  • Lambda functions — function settings (runtime, memory, timeout), deprecated runtimes, and functions with no invocations in the last 14 days
  • S3 buckets — bucket-level settings only: public access block, default encryption, and versioning
  • Security groups — inbound rules that open common admin and database ports to the whole internet
  • AWS cost by service — from Cost Explorer: month-to-date totals, plus hourly per-service costs that serve as the baseline for spotting cost increases

Not covered yet: VPC/NAT gateways, load balancers, DynamoDB, Kinesis, ElastiCache, OpenSearch, Bedrock.

Read-only: Cloudlink is read-only and never changes anything in your account. See Read-only by design.


Read-only by design

  • The IAM role Cloudlink uses allows 22 actions, and every one is a Describe, Get or List call. It has no write permissions and no s3:GetObject, so Cloudlink cannot read the contents of your buckets. The full list is in Permissions.
  • The role can only be assumed by Cloudlink's AWS account, and only with the External ID you choose when you deploy the stack.
  • The Cloudlink API runs in read-only mode. Requests that would change a resource, such as approving or running an action, AutoStop runs, or starting and stopping a resource, are refused with HTTP 403.
  • Cloudlink's test suite checks the CloudFormation template and fails if common write actions (for example Put, Delete, Start, Terminate or StopInstances) or s3:GetObject appear in it.
  • You can cut off access at any time by deleting the CloudFormation stack in your AWS account.

Pricing

Cloudlink's fee is 15% of verified savings. If there are no verified savings, there is no fee. The fall 2026 pilot is free. See the pricing page or the pilot page.


Quick start

1
Create your account

Sign up at cloudlinkglobal.com/signup, or apply for the free pilot at cloudlinkglobal.com/pilot.

2
Connect an AWS account

Deploy the Cloudlink CloudFormation template in your AWS account and paste the role ARN into Cloudlink. See Connecting AWS.

3
Run a scan

Click Scan next to the account on the Credentials page of the dashboard. After that, scans run automatically (every 30 minutes by default).

4
Turn on alerts

Add a Slack incoming webhook URL on the Webhooks page to get Slack messages for cost regressions and budget thresholds. See Slack alerts.

5
Send deploy events (optional)

Add one step to your CI pipeline so Cloudlink can compare cost before and after each deploy. See the CI integration guide.


Requirements

Cloudlink is hosted, so there is nothing to install. You need:

  • An AWS account, and permission to deploy a CloudFormation stack that creates an IAM role
  • For cost-increase detection and budgets: hourly granularity turned on in Cost Explorer (see Cost data)
  • A current version of Chrome, Firefox, Safari or Edge for the dashboard

Connecting AWS

Prerequisites: permission to deploy CloudFormation stacks that create IAM roles in the AWS account you want to connect.

1
Download the template

In the dashboard, open Credentials, click + Add credential, and download cloudlink-role.yaml. The same file is available at:

https://cloudlink-agents.onrender.com/setup/cloudformation-template
2
Deploy the stack

Create a stack from the template in the AWS CloudFormation console. It asks for:

  • ExternalId — a secret string you choose (8 to 128 characters). Keep it; you enter it in Cloudlink in step 4.
  • RoleName — defaults to CloudlinkRole.
  • CloudlinkAccountId — only shown if the template does not already include Cloudlink's AWS account ID. Use the 12-digit ID we give you during onboarding.

The stack creates one IAM role. Its trust policy lets only Cloudlink's AWS account assume it, and only when the External ID matches. It has one inline policy, CloudlinkReadOnly, with the 22 read-only actions below. Sessions last at most one hour.

3
Copy the role ARN

When the stack is complete, copy RoleArn from the stack's Outputs tab.

4
Save the credential in Cloudlink

Back on the Credentials page, paste the role ARN and your External ID, and list the regions to scan (comma-separated). If you leave regions empty, only us-east-1 is scanned. Click Save credential.

5
Verify the connection

Click Verify. Cloudlink assumes the role with your External ID and shows the AWS account identity it got back.


Permissions

These are all of the actions in the role's policy. Each one is a Describe, Get or List call, on Resource: '*'.

IAM actions
ec2:DescribeInstances
ec2:DescribeInstanceStatus
ec2:DescribeSecurityGroups
ec2:DescribeVpcs
ec2:DescribeSubnets
ec2:DescribeVolumes
ec2:DescribeRegions
ec2:DescribeTags
cloudwatch:GetMetricStatistics
cloudwatch:ListMetrics
ce:GetCostAndUsage
ce:GetCostForecast
s3:ListAllMyBuckets
s3:GetBucketLocation
s3:GetBucketPublicAccessBlock
s3:GetBucketEncryption
s3:GetBucketVersioning
s3:GetBucketAcl
rds:DescribeDBInstances
rds:DescribeDBClusters
lambda:ListFunctions
sts:GetCallerIdentity

A few of these are not used by the current scanner: ec2:DescribeInstanceStatus, ec2:DescribeVpcs, ec2:DescribeSubnets, ec2:DescribeRegions, ec2:DescribeTags, cloudwatch:ListMetrics, s3:GetBucketAcl and rds:DescribeDBClusters.


Managing connections

Connected AWS accounts are listed on the Credentials page. For each one you can:

  • Verify — check that Cloudlink can still assume the role
  • Scan — start a scan now instead of waiting for the next scheduled one
  • Delete — remove the stored role ARN and External ID from Cloudlink

To connect another AWS account, deploy the template in that account and add it as a second credential. Accounts in an AWS Organization are not discovered automatically; each one is connected separately.

Deleting a credential in Cloudlink stops Cloudlink from using it. To revoke access from your side, delete the CloudFormation stack.


How scanning works

  • Scans run on a schedule (every 30 minutes by default) and on demand, from the Scan button or POST /scan.
  • EC2, EBS, RDS, Lambda and security groups are scanned only in the regions you listed for the credential. S3 and Cost Explorer are account-wide.
  • Cloudlink stores the latest state of each resource it reports. You can see them on the Resources page or with GET /resources.

AWS charges: AWS bills Cost Explorer API requests to the account being scanned (currently $0.01 per request). Each scan makes three Cost Explorer requests.


EC2 instances

  • Only running instances that have been up for at least 24 hours are checked. Stopped instances are not scanned.
  • For each instance, Cloudlink reads the average CPUUtilization from CloudWatch over the last 7 days.
  • An instance with an average below 5% is marked idle.
  • Cloudlink also records the instance type, platform, monitoring state and tags.

EBS volumes

Cloudlink flags volumes in the available state, which means they are not attached to any instance but are still billed. For each one it records size, volume type, encryption and tags. EBS snapshots are not scanned.


Lambda functions

  • Cloudlink lists functions in each region and records runtime, memory, timeout and code size. It does not download function code.
  • It flags functions with no invocations in the last 14 days (from the CloudWatch Invocations metric).
  • It flags functions on deprecated runtimes, such as python3.6 or nodejs12.x.

RDS databases

For each RDS database instance, Cloudlink records the engine, instance class and status, and flags:

  • Stopped instances
  • Instances that are publicly accessible
  • Instances with unencrypted storage
  • Instances with automated backups turned off
  • Instances that are not Multi-AZ

DB clusters are not checked separately.


S3 buckets

Cloudlink checks bucket-level settings only. It never reads objects. It flags buckets where:

  • The public access block is missing or not fully turned on
  • No default encryption is configured
  • Versioning is not enabled

Bucket policies, ACLs, bucket size and request or data-transfer charges are not checked yet.


Security groups

Cloudlink flags security groups with inbound rules open to 0.0.0.0/0 or ::/0 that include port 22 (SSH), 3389 (RDP), 5432 (PostgreSQL), 3306 (MySQL) or 27017 (MongoDB). Rules that allow all protocols are not flagged yet.


Cost data

On each scan, Cloudlink reads from Cost Explorer (unblended cost):

  • The month-to-date total for the account
  • Month-to-date cost by service
  • Hourly cost by service for the last 48 hours

Hourly values are stored as one snapshot per service per hour. They are the baseline for cost regressions and the spend figure for budgets. You can read them with GET /cost-snapshots.

In development: scans read hourly costs but don't yet save them as snapshots automatically. Today, snapshots are only saved when cost data is sent to Cloudlink's ingest API, so cost-regression detection and budgets only work with ingested data. Automatic snapshots from scans are being built.

Hourly granularity: AWS only returns hourly cost data if hourly granularity is turned on in your Cost Explorer preferences, and AWS charges for it. Without it, Cloudlink still reads month-to-date costs, but cost-regression detection and budgets have no data to work with.


What is a cost regression?

In development. Regression detection depends on hourly cost snapshots, which scans don't save automatically yet (see Cost data).

A cost regression is a rise in a service's hourly cost right after a deploy. Cloudlink only looks for regressions around deploy events you send it (see the CI integration guide). If you don't send deploy events, no regressions are created.


How detection works

Detection runs every 30 minutes by default. You can also run it from the Deploys page (Run detection) or with POST /regression/run. Each run:

  1. Picks deploy events that are at least 2 hours old and have not been analysed yet
  2. Computes the baseline: the average hourly cost of the deploy's service in the snapshots from before the deploy hour
  3. Computes the post-deploy cost: the average hourly cost over up to three hours, starting the hour after the deploy
  4. If there is not enough data yet, leaves the deploy for the next run
  5. If the post-deploy cost is at least 10% above the baseline, creates an open regression

Each regression records the baseline and post-deploy hourly cost, the percentage change, an estimated monthly impact of (post − baseline) × 24 × 30, and a confidence of high (increase of 20% or more) or medium. Deploys that stay under the threshold are saved as resolved with a 0% change, so filter with ?status=open to see only real regressions.

Service names must match: the service in a deploy event has to match a Cost Explorer service name exactly, for example AWS Lambda. Use GET /cost-snapshots/services to see the names Cloudlink has data for.


Regression alerts

When a regression is created, Cloudlink sends a Slack message (if Slack is set up) and a regression.detected webhook to any webhook subscribed to that event. The Slack message shows:

  • The service
  • The cost increase in percent
  • The estimated monthly impact
  • The confidence level
  • The deploy's version and environment, and the deploy ID
  • A link to the Regressions page in the dashboard

Acknowledging and resolving

A regression is open, acknowledged (your team is looking at it) or resolved. You can change the status on the Regressions page or with the API. Changing the status only updates Cloudlink's records. Cloudlink does not roll back deploys or apply fixes; your team does that.


Budgets

A budget is a monthly spending limit for the whole account or for one service. Create budgets on the Budgets page or with POST /budgets:

json
{
  "name": "Lambda monthly",
  "monthly_limit_usd": 200,
  "scope": "service",
  "service": "AWS Lambda",
  "alert_thresholds": [50, 80, 100]
}
name
Required.
monthly_limit_usd
Required. Must be greater than 0.
scope
"total" (default) for the whole account, or "service" for one service.
service
The Cost Explorer service name, when scope is "service".
alert_thresholds
Percentages of the limit that trigger an alert. Default [50, 80, 100].

Cloudlink checks budgets every hour. POST /budgets/check runs the same check right away. A check compares this month's spend against each enabled budget, and for each threshold that has been reached and has not already alerted this month, it:

  • Records an alert (see GET /budgets/alerts)
  • Sends a budget.threshold_reached webhook
  • Sends a Slack message, if Slack is set up

Budgets only send alerts. They do not block deploys or stop resources.

This month's spend is the sum of the hourly cost snapshots Cloudlink has stored for the month, so it can be lower than your AWS bill, for example if the account was connected partway through the month.


API — Authentication

Send your API key as a bearer token in the Authorization header:

bash
curl https://cloudlink-agents.onrender.com/stats \
  -H "Authorization: Bearer YOUR_API_KEY"

During the pilot, API keys are issued by the Cloudlink team. Email satvikranga60@gmail.com to request one. Every key belongs to one Cloudlink account and only sees that account's data.

GET /health and GET /setup/cloudformation-template do not need a key. Every other endpoint below does.

Security tip: Keep API keys in environment variables or CI secrets. Never commit them to version control or put them in client-side code.


Base URL

https://cloudlink-agents.onrender.com

Most endpoints have no version prefix. A small set of read-only endpoints is also available under /v1 (see Endpoints — v1). Requests and responses are JSON.

Request and response schemas are in the interactive API docs at https://cloudlink-agents.onrender.com/docs. The full endpoint list is on the API reference page, and you can try requests in the API playground.


Rate limits

These endpoints have rate limits, counted per Cloudlink account:

  • POST /scan — 5 requests per minute
  • POST /regression/run — 5 requests per minute
  • POST /credentials — 10 requests per minute

Going over a limit returns HTTP 429.


Endpoints — Accounts and scans

MethodEndpoint
GET
/health
Service health check (no key needed)
GET
/setup/cloudformation-template
Download the CloudFormation template (no key needed)
GET
/stats
Resource count and last scan for your account
GET
/credentials
List connected AWS accounts (secrets masked)
POST
/credentials
Add an AWS account: { cloud: "aws", label, role_arn, external_id, regions }
POST
/credentials/{id}/verify
Assume the role and return the AWS account identity
DELETE
/credentials/{id}
Remove a connected account
POST
/scan
Start a scan of all connected accounts (optional body: { credential_ids: [...] })
GET
/scans
Scan history
GET
/resources
Scanned resources (?resource_type=, ?limit=, ?offset=)

Endpoints — Deploys and regressions

MethodEndpoint
POST
/deploys
Record a deploy event
GET
/deploys
List deploy events (?service=, ?limit=)
GET
/deploys/{id}
Get one deploy event
GET
/regressions
List regressions (?status=open|acknowledged|resolved, ?limit=)
GET
/regressions/{id}
Get one regression
POST
/regressions/{id}/acknowledge
Mark an open regression as acknowledged
POST
/regressions/{id}/resolve
Mark a regression as resolved
POST
/regression/run
Run regression detection now
GET
/cost-snapshots
Hourly cost snapshots by service (?service=, ?limit=)
GET
/cost-snapshots/services
Service names that have cost snapshot data

Record a deploy from your CI pipeline after a successful deploy. Only service is required:

bash
curl -X POST https://cloudlink-agents.onrender.com/deploys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "service": "AWS Lambda",
    "version": "a3f8c1d",
    "environment": "production",
    "source": "github-actions"
  }'

The response is { "deploy_id": "...", "service": "...", "deployed_at": "..." }. Field details are in the CI integration guide.


Endpoints — Budgets

MethodEndpoint
GET
/budgets
List budgets with this month's spend and utilization
POST
/budgets
Create a budget
PUT
/budgets/{id}
Update a budget
DELETE
/budgets/{id}
Delete a budget
GET
/budgets/alerts
Budget alert history (?budget_id=, ?limit=)
POST
/budgets/check
Check budgets now and send alerts for thresholds reached

Endpoints — Alerts

MethodEndpoint
GET
/webhooks
List webhooks (secrets masked)
POST
/webhooks
Register a webhook: { url, secret?, events? }
DELETE
/webhooks/{id}
Remove a webhook
POST
/webhooks/test
Send a ping event to webhooks subscribed to ping
GET
/settings/slack
Get the Slack webhook setting
PUT
/settings/slack
Set the Slack webhook: { slack_webhook_url, enabled }
POST
/settings/slack/test
Send a test message to Slack

Endpoints — v1

Read-only endpoints that wrap the same data with an api_version field:

MethodEndpoint
GET
/v1/costs
Total cost, cost by service and daily trend from cost snapshots (?days=30)
GET
/v1/regressions
Regressions (?status=)
GET
/v1/resources
Scanned resources (?resource_type=)
GET
/v1/deploys
Deploy events (?service=, ?limit=)
GET
/v1/budgets
Budgets with their most recent alerts

Errors

Errors return JSON with a detail field:

json
{ "detail": "Invalid or missing authentication. Use a Clerk session or API key." }
400
Bad Request
A field is missing or invalid (some endpoints use 422 for this).
401
Unauthorized
Missing or invalid API key.
403
Forbidden
The request would change something in your cloud account, which read-only mode does not allow.
404
Not Found
The resource does not exist in your account.
422
Unprocessable
A field is missing or invalid.
429
Rate Limited
Too many requests. See Rate limits.
500
Internal Server Error
Something went wrong on our side. Email us if it keeps happening.

MCP server

Status: in development. The MCP server is not published as a package and does not yet work with the hosted API, so it is not available to pilot customers.

Cloudlink has an early Model Context Protocol (MCP) server that lets AI assistants such as Claude Desktop or Cursor read your Cloudlink data. It is a Python script (mcp_server.py) that talks to the Cloudlink API over stdio and only reads data.


MCP tools

The read-only tools it defines:

get_cost_summary
Recent spend by service, from cost snapshots.
get_cost_breakdown
Cost grouped by service, from cost snapshots.
get_cost_anomalies
Services whose recent cost is unusually high compared with earlier snapshots.
get_cost_regressions
Recent cost regressions.
get_budgets
Budgets and how much of each has been used.

Slack alerts

Cloudlink posts to Slack through a Slack incoming webhook.

Setup

  1. In Slack, create an incoming webhook for the channel you want alerts in. The URL starts with https://hooks.slack.com/.
  2. In the Cloudlink dashboard, open Webhooks and paste the URL into Slack Alerts. (API: PUT /settings/slack.)
  3. Send a test message to check it works. (API: POST /settings/slack/test.)

What gets sent

  • A message for each new cost regression (see Regression alerts)
  • A message each time a budget threshold is reached, with the budget name, threshold, scope, current spend, limit and utilization

Deploy events from CI

To tie cost changes to deploys, add a step after your deploy step that calls POST /deploys. For GitHub Actions:

yaml
# .github/workflows/deploy.yml
- name: Notify Cloudlink of deploy
  if: success()
  run: |
    curl -s -X POST ${{ secrets.CLOUDLINK_API_URL }}/deploys \
      -H "Authorization: Bearer ${{ secrets.CLOUDLINK_API_KEY }}" \
      -H "Content-Type: application/json" \
      -d '{
        "service": "AWS Lambda",
        "version": "${{ github.sha }}",
        "environment": "production",
        "source": "github-actions"
      }'

Set CLOUDLINK_API_URL to https://cloudlink-agents.onrender.com. The CI integration guide has GitLab CI and plain curl examples, and the field list.


Email

Cloudlink sends a weekly summary email on Mondays at 08:00 UTC to your account's notification email. It covers the week's spend compared with the week before, the top services by cost, the number of cost regressions that week, and a short list of suggestions. Regression and budget alerts are sent to Slack and webhooks, not email.


Webhooks

Cloudlink can send events as HTTP POST requests to your own endpoint, so you can forward them to your own tools. Register a webhook on the Webhooks page or with the API:

bash
curl -X POST https://cloudlink-agents.onrender.com/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/cloudlink-hook",
    "secret": "a-long-random-string",
    "events": ["regression.detected", "budget.threshold_reached", "deploy.created", "scan.finished"]
  }'

The URL must be a public http or https address. A webhook only receives the events in its events list. If you leave events out, the only event in the default list that Cloudlink currently sends is scan.finished, so list the events you want.

Events

  • regression.detected — a new cost regression was created
  • budget.threshold_reached — a budget crossed one of its thresholds
  • deploy.created — a deploy event was recorded
  • scan.finished — a scan of one connected account finished
  • ping — sent by POST /webhooks/test to webhooks subscribed to it

Payload

The body has the event name and an event-specific payload. Example for regression.detected (values are illustrative):

json
{
  "event": "regression.detected",
  "payload": {
    "regression_id": "…",
    "tenant_id": "…",
    "deploy_id": "…",
    "service": "AWS Lambda",
    "version": "a3f8c1d",
    "environment": "production",
    "deployed_at": "2026-10-01T14:32:00+00:00",
    "baseline_hourly_usd": 0.5,
    "post_hourly_usd": 0.6,
    "change_pct": 20.0,
    "monthly_impact_usd": 72.0,
    "confidence": "high"
  }
}

Verifying the signature

If you set a secret, each request has an X-Cloudlink-Signature header with the value sha256= followed by the hex HMAC-SHA256 of the raw request body, keyed with your secret:

python
import hmac
import hashlib

def verify_webhook(payload: bytes, signature: str, secret: str) -> bool:
    """Verify the X-Cloudlink-Signature header."""
    expected = hmac.new(secret.encode(), payload, hashlib.sha256).hexdigest()
    return hmac.compare_digest(f"sha256={expected}", signature)