LogoLogo
  • Getting Started
    • Introduction to OneLens
    • Operational Cost of OneLens
    • Onboarding Guide
    • Accessing OneLens
  • Integrations
    • Cloud Services
      • Connect to AWS
    • Kubernetes
      • OneLens Agent
        • Onboarding a K8s Cluster
        • Artifacts
      • Enable Split Cost Allocation for EKS
  • User Guide
    • Observe ( Visibility and Insights)
      • Cost Analyzer
        • Saved Views
      • Cost Watcher
        • Cost Anomaly
      • Data Transfer Cost Reports
    • Optimize (Cost Savings & Recommendations)
      • Saving Dashboard
        • About Potential Savings
        • View Potential Savings
        • About Achieved Savings
        • View Achieved Savings
      • Policy Violations
        • Drill Down into Policy Violations
      • S3 Optimization
        • Detailed View of Buckets
        • Cost & Usage Breakdown
        • S3 Insights
    • Automate
      • Workflows & Automation
        • Triggers
        • Actions
        • Usecases
          • Automating Periodic Cloud Cost Reports
          • Automatically Create Jira Issues for New Tickets
          • Email Notifications of New Tickets
          • Configure Periodic Digests for Pending Tickets
          • Automating Cost Anomalies Email Alerts
          • Escalation of High-Value Pending Tickets
      • Remediations (Runbooks)
        • Install Runbooks
        • Runbook Catalog
          • Delete CloudWatch Alarms in Insufficient State
          • Delete EBS Snapshots for which corresponding volumes are not in use
          • Delete Idle ElastiCache/Memcached Cluster
          • Delete RDS Snapshots older than a specified period of time
          • Delete idle Classic/Application Load Balancers
          • Delete unused EBS Volumes
          • Delete unused Elastic IP
          • Delete unused NAT Gateway
          • Migrate EBS Volumes from gp2 to gp3
          • Set retention period for CloudWatch Logs
        • Execution Logs
    • Govern ( Control & Governance)
      • Cost Optimization Policies
  • Facts & FAQs
    • FAQs
      • Connect Slack Private Channels to OneLens
Powered by GitBook
On this page
  • What It Does
  • Risk and Scope
  • Optimization Policies Addressed
  • Risk Mitigation
  • How to Install
  • Runbook Workflow
  • Step 1: Start
  • Step 2: DescribeSnapshots
  • Step 3: If/Else
  • See How it Works
  • Triggering the Runbook
  • 1. Locate the Ticket
  • 2. Execute the Runbook
  1. User Guide
  2. Automate
  3. Remediations (Runbooks)
  4. Runbook Catalog

Delete EBS Snapshots for which corresponding volumes are not in use

What It Does

Deletes Amazon EBS snapshots whose corresponding volumes are no longer in use. These orphaned snapshots can consume unnecessary storage costs.

Recommendation

If you require snapshots but are accessed infrequently, consider archiving them for up to 75% savings.

However, archived snapshots incur a minimum 90-day charge, and restoring them may take up to 72 hours.

Risk and Scope

Detail
Value

Risk Level

Low

AWS Service Targeted

Amazon EBS

Permissions Required

Delete Permission

  • ec2:DeleteSnapshot

Read Permission

  • ec2:DescribeSnapshots

These permissions are granted only to the runbook, not to the OneLens platform itself.

Optimization Policies Addressed

This runbook to remediate violation tickets triggered by of the following policy:

Policy ID
Policy Name

ebs_100

EBS Snapshots of the deleted volumes should be deleted

ebs_101

EBS Snapshots of unattached EBS volumes should be deleted

ebs_102

EBS Snapshots created while copying AMI should be deleted

Risk Mitigation

Risk Mitigation Strategy

  • The change is assessed as low risk with limited scope and impact.

  • No downtime is expected during or after implementation.

  • No additional safety measures are required due to the non-disruptive nature of the change.

  • A rollback plan is not defined, as standard procedures are sufficient to manage the change.

How to Install

Runbook Workflow

Step 1: Start

Trigger: Begins the runbook to identify and remove orphaned EBS snapshots.

Step 2: DescribeSnapshots

Action: Calls DescribeSnapshots to retrieve all EBS snapshots.

Step 3: If/Else

Condition: Checks if any snapshots exist for which the associated EBS volumes no longer exist.

  1. BranchOnValidSnapshot

    Verifies if each snapshot state is completed.

    1. DeleteSnapshot Executes DeleteSnapshot for snapshots that qualify for deletion.

    2. RunScript

      Raises a runtime error to capture errors, failing the workflow explicitly.

  2. Else:

    The workflow ends if no qualifying snapshots are found.

See How it Works

Triggering the Runbook

To run this runbook:

1. Locate the Ticket

Find the ticket generated by the above policy violation.

2. Execute the Runbook

PreviousDelete CloudWatch Alarms in Insufficient StateNextDelete Idle ElastiCache/Memcached Cluster

Last updated 1 month ago

Refer to the for steps to install and enable this runbook in your environment.

Follow the steps described in the section to apply this runbook to the ticket.

Runbook Setup Guide
executing a runbook