Schedule icon
Commands icon
Docker icon
If icon
SlackIncomingWebhook icon
Log icon

Audit Stale EBS Snapshots for Reclaimable Waste

Find EBS snapshots older than retention and alert Slack with reclaimable waste ids.

Categories
CloudInfrastructure

Forgotten snapshots bill every month for data nobody restores. This blueprint lists self-owned EBS snapshots, flags those older than retention_days, and alerts Slack with the exact stale ids. The schedule ships disabled so you can verify credentials first.

How it works

  1. audit_snapshots (io.kestra.plugin.scripts.shell.Commands on the AWS CLI) runs describe-snapshots --owner-ids self, filters by StartTime age, and emits counts plus the stale list via the ::{"outputs": ...}:: protocol.
  2. waste_found (io.kestra.plugin.core.flow.If) branches: any stale snapshot -> alert_waste; clean -> log_clean.
  3. The errors block alerts when the audit itself fails.
  4. Triggers: a disabled weekly Schedule.

What you get

  • Named list of stale snapshot ids past retention.
  • A weekly FinOps sweep with history in every execution.
  • Failure alerts so a dead credential never reads as "no waste".

Who it's for

  • FinOps engineers trimming EBS spend.
  • Platform teams enforcing snapshot retention.
  • Anyone surprised by last month's snapshot line item.

Why orchestrate this with Kestra

The AWS CLI answers questions; the flow turns them into a verdict on a schedule, with an alert that names names. The next step (deregister + delete-snapshot, tag the owner, open a ticket) is one task away.

Prerequisites

  • Docker available on the Kestra Worker.
  • AWS credentials with ec2:DescribeSnapshots in the environment or an instance profile.
  • A Slack webhook.

Secrets

  • SLACK_WEBHOOK_URL: webhook for waste and failure alerts.

Quick start

  1. Add the Slack webhook secret and AWS credentials.
  2. Run once to see audit_summary.
  3. Enable the weekly schedule.

How to extend

  • Auto-delete with deregister after a second confirmation window.
  • Cross-check snapshot VolumeId against live volumes before flagging.
  • Sum VolumeSize to estimate monthly savings.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.