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: DescribeVolumes
  • Step 3: setIOPS
  • Step 4: 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

Migrate EBS Volumes from gp2 to gp3

What It Does

Migrates Amazon EBS volumes from gp2 to gp3. The gp3 volumes offer better price-performance compared to gp2, allowing cost savings without compromising performance. This migration is performed safely with snapshot backup and volume modification.

Risk and Scope

Detail
Value

Risk Level

Low

AWS Service Targeted

EC2 / EBS

Permissions Required

Modify and Create Permissions

  • ec2:ModifyVolume

  • ec2:CreateSnapshot

Read Permissions

  • ec2:DescribeVolumes

  • ec2:DescribeSnapshots

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

Optimization Policies Addressed

This runbook remediates violation tickets triggered by of the following policy:

Policy ID
Policy Name

ebs_1

General purpose EBS volumes should be of gp3 volume type

Risk Mitigation

Risk Mitigation Strategy

  • Snapshots are taken before the change to prevent any data loss.

  • The volume can be re-created from that snapshot if needed.

How to Install

Runbook Workflow

Step 1: Start

Trigger: Begins the workflow to migrate EBS volumes from gp2 to gp3.

Step 2: DescribeVolumes

Action: Executes DescribeVolumes on EC2 to gather details of all volumes.

Step 3: setIOPS

Action: Runs a script to determine the appropriate IOPS value for the gp3 volume.

Step 4: If/Else

Condition: Determines whether the volume type is gp2.

  1. If the volume is gp2, proceeds with the migration steps:

    1. SnapshotVolume Executes CreateSnapshot on EC2 to create a backup of the volume.

    2. WaitForSnapshotCompletion Executes DescribeSnapshots to ensure the snapshot has completed.

    3. ModifyVolume Executes ModifyVolume on EC2 to convert the volume type to gp3 with the specified IOPS.

  2. Else: Terminates the runbook as the volume is not gp2.

See How it Works

Triggering the Runbook

To run this workflow:

1. Locate the Ticket

Identify the ticket associated with the above mentioned policy violation.

2. Execute the Runbook

PreviousDelete unused NAT GatewayNextSet retention period for CloudWatch Logs

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