Hundreds of snapshots are often created daily by an engineering team or generated automatically by AWS policies to back up data on Amazon Elastic Block Storage (EBS). Outdated backups accumulate quickly, generating unnecessary costs. 

In this complete guide, we’ll walk you through the process of how to cost optimize your EBS snapshots to save on your AWS bill — with a step-by-step guide, screenshots and best practices.

First, let’s quickly dive into the basics of how Snapshots work and how they are charged.

What are Amazon EBS Snapshots?

EBS Snapshots allow secure and efficient backups of storage volumes. By using snapshots, you can copy data to Amazon S3, ensuring easy access in case of need. 

Amazon EBS snapshots work like a version control system. They save the current version of the data, and each new snapshot is similar to a “commit,” containing only the changes made since the last snapshot. This method allows efficient backup management by storing only the differences between versions, which saves storage space and simplifies the recovery of specific data from a particular point in time.

How do orphaned snapshots accumulate and drive up costs?

An engineering team creates many, many snapshots per day — or they can be generated en masse by automated AWS backup policies. If you delete an instance in AWS, the volume is also deleted, but the snapshots remain. It is easy to forget about these orphaned snapshots as they continue to generate storage costs.

EBS Snapshot pricing: a quick intro

Amazon EBS charges for snapshots by the gigabyte-month. Charges are based on the size of your snapshot and how long you keep it.  AWS snapshots are stored incrementally, i.e. the first snapshot of your instance is a full copy and each next snapshot is an incremental backup of what changed. 

For the Standard tier, you incur charges only for changed blocks that you store. For the Archive tier, you incur charges for all snapshot blocks that you store. You also incur charges to retrieve snapshots in the Archive tier.

Current EBS snapshot pricing in the Standard and Archive tier
Current Amazon EBS snapshot pricing in the Standard and Archive tier

Here are some example scenarios given by AWS for each storage tier:

Standard tier: You have a volume that stores 100 GB of data. You incur charges for the full 100 GB of data for the first snapshot (snap A). At the time of the next snapshot (snap B), you have 105 GB of data. Amazon EBS then bills you for only the additional 5 GB of storage for incremental snap B.

Archive tier: You archive snap B. The snapshot then moves to the Archive tier, and Amazon EBS bills you for the full 105 GB snapshot block.

Keep in mind that the cost is NOT limited to the storage of the snapshots themselves. The frequent creation and management of snapshots can require additional time and resources to configure and maintain appropriate retention policies, as well as to monitor and optimize storage use.

Related Content

The Definitive Guide to AWS Rightsizing

Cut cloud waste and pay only for what you need

How to optimize snapshots to reduce AWS costs

For cost and efficiency reasons, it is not worth keeping very old and obsolete snapshots. Recovering data from more recent snapshots is generally sufficient to meet most restoration and backup needs. Implementing a retention policy that eliminates outdated backups can help optimize spending and storage resource management.

This retention policy should be automated. In many cases, snapshots older than 30 days can be considered obsolete and either deleted or archived (for example, if you need to keep data for compliance, auditing, or other reasons), resulting in significant cost reduction. When this is not possible, it is recommended to keep daily snapshots for one week, weekly for one month, and monthly for one year.

Step-by-Step Guide to Automatically Deleting Old EBS Snapshots

Let’s dive into the practical details of how to find, filter, analyze, and archive or delete orphaned snapshots

Visual workflow: step-by-Step Guide to Automatically Deleting Old Snapshots

Step 1: Retrieve Showback (Financial) Data

Setting up the AWS Cost and Usage Report (CUR):

  1. Enable Cost and Usage Report in the AWS Management Console:
  2. Download the CUR Data Using AWS SDK for Python (boto3):
    1. Initialize an S3 client, connect to your s3 bucket and list objects
    2. Download the latest report and Load the data into a dataframe (or similar structure) for analysis.

Step 2: Retrieve EBS Snapshot Data

  1. Use the describe_snapshots function from AWS SDK for Python (boto3) to retrieve snapshot data.
    1. Initialize the boto3 client for EC2 to connect to your EC2 resources.
    2. Use the describe_snapshots function to fetch all snapshots owned by your account.

    Convert the snapshot data to a DataFrame for easier analysis.

Step 3: Merge Showback and Snapshot Data

  1. Merge the data using snapshot_id as the key. 

Step 4: Filter Snapshots Older Than 30 Days for Each EBS Volume

The steps here are to retrieve unique volume IDs and analyze the creation date (StartTime) of all snapshots. For each volume, recommend only the most recent snapshot for archiving if it is older than 30 days.
    1. Ensure the StartTime column in your snapshot data is in datetime format.
    2. Define a date limit to identify snapshots older than 30 days.
    3. Filter your snapshot data to get snapshots older than 30 days and retrieve unique volume IDs.
    4. For each unique volume ID, find the most recent snapshot that is older than 30 days.
    5. Compile the recommended snapshots for archiving into a structured format.

Step 5: Calculate Current & Archived EBS Snapshot Cost

  1. Ensure the line_item_unblended_cost column contains the cost data for each snapshot.
  2. Add new columns for cost data, snapshot size, and archived cost.
 

Daily costs

Monthly costs

Annual costs

Original cost data

Unblended cost

Unblended cost x 30

Unblended cost x 365

Archived cost data

Snapshot size x monthly archive storage cost rate (e.g. $.0125 per GB) ÷ 30

Snapshot size x monthly archive storage cost rate (e.g. $.0125 per GB)

Snapshot size x monthly archive storage cost rate (e.g. $.0125 per GB) x 12

Step 6: Calculate Savings After Archiving EBS Snapshots

Calculate the daily savings, monthly savings, and annual savings by subtracting the relevant archived cost from the relevant original cost.

EBS Snapshot Cleanup is Better with nOps

If you’re tired of the manual work to continually track down and clean up each unused snapshot, you’re not alone. That’s why we created a feature to make it easy.

With nOps, you can save on storage with the best, most reliable clean-up recommendations. Our algorithms are finely tuned to identify and analyze unused or redundant snapshots based on comprehensive criteria like age, expected frequency of use, and unreferenced data. nOps also intelligently excludes snapshots governed by existing AWS lifecycle policies, shared across accounts, or with critical features enabled.

With nOps, you can see an act on all snapshots in one place. One-click bulk cleanup helps you stay continually optimized for a fraction of the engineering time and effort — freeing you to focus on building and innovation rather than maintenance.

Review snapshots to archive in the nOps dashboard
Review snapshots to archive in the nOps dashboard displaying Volume ID, snapshot size, annualized savings, snapshot age, and unrealized data percentage

How it Works

EBS Snapshot Cleanup integrates with AWS’s API to analyze snapshot data blocks, identifying unreferenced or outdated snapshots. 

  1. nOps uses AWS APIs to pull detailed information about each snapshot’s data blocks. Each snapshot consists of numerous blocks (e.g., half a MB each for a 100 GB snapshot).
  2. The tool compares the data blocks between snapshots to determine uniqueness and relevance. 
  3. The algorithm assesses snapshots based on several criteria:
    • Age and Frequency of Use: If a snapshot is the most recent snapshot and at least 30 days old, it is considered to be a full snapshot or an end of project snapshot. This indicates the snapshot won’t be frequently used, and can generate savings by being moved to the Archive tier.
    • Unreferenced Data: Snapshots that are not the most recent snapshot and contain more than 25% unreferenced data blocks are also considered outdated (as data contained are largely redundant and already included in other more recent snapshots, or has been removed).
    • Exclusion Rules: Snapshots are excluded from automatic cleanup recommendations if they:
      • Are already governed by existing AWS lifecycle policies
      • Are shared across accounts
      • Have enabled features like Fast Snapshot Restore
      • Are already on Archive tier
  4. Based on this analysis, the system recommends whether to archive snapshots. If recommendations are approved, archived snapshots are moved to cheaper storage tiers to reduce costs while retaining data access.
  5. Users can review these automated recommendations in one place in the nOps dashboard and choose to act on them in bulk, optimizing storage automatically and reducing costs.


EBS Snapshot cleanup is just the latest feature added to nOps Cloud Optimization Essentials, your toolkit for fast and easy cloud optimization.

nOps was recently ranked #1 with five stars in G2’s cloud cost management category, and we optimize $1.5+ billion in cloud spend for our customers.

Join our customers using nOps to leverage automation to save on AWS with complete confidence by booking a demo with one of our AWS experts