AWS – Unattached Volumes Report

In the dynamic world of cloud computing, efficient management of resources is crucial for optimal performance and cost-effectiveness.

Amazon Web Services (AWS) provides a vast array of services and managing resources like Elastic Block Store (EBS) volumes is essential to avoid unnecessary costs and ensure a well-organized infrastructure. In this blog post, we’ll explore the concept of unattached volumes in AWS and how to generate a comprehensive Unattached Volumes Report using a PowerShell script.

volumes in AWS refer to Elastic Block Store volumes that are not currently attached to any running EC2 instances.

These volumes might be left over from terminated instances, orphaned due to incomplete detachment, or simply forgotten, leading to unnecessary costs and potential security risks.

Prerequisites for this Solution:

Download the script from Git or PowerShell gallery from below links:

Git:

https://github.com/VikasSukhija/Downloads

AWSUnattachedVolumes.ps1

PowerShell Gallery:


https://www.powershellgallery.com/packages/AWSUnattachedVolumes

Install-Script -Name
AWSUnattachedVolumes


Update the below section of the script with your own parameters:


Note: We are finding the older unattached volumes created 1 week ago, not touching the new ones.

This script needs access and secret key of the account that can assume a role that has access to read the Unattached Volumes information across the whole organization.

Please secure the access key and secret key as encrypted if you will schedule this script in production.

Script will fetch below details for each Unattached Volume


Update the Tag code as per Your environment.(Below Example for Name and Owner Key)


Here is the Email that email address mentioned in variable will receive


Here is the CSV report that your will get:


I hope this PowerShell Solution will assist you in generating the Unattached Volumes report in your AWS instance.

Thanks for reading and downloading…

 

Tech Wizard

 

https://techwizard.cloud

https://syscloudpro.com/

PowerShell Fast Track

Leave a comment