export the list of AWS unattached EBS volumes to an Excel file. Please update "profile" section of script Run this in Powershell ISE for more granularity
- Events rule triggers the Lambda function.
- Lambda function assumes the IAM role 3)Lambda function then interacts with the EC2 service to identify unattached EBS volumes
- then Creates snapshots of these volumes
- Then Tag the snapshots (zotec:component = UnattachedVolume90daydelete)
- Deletes the unattached volumes
- Then Another Eventbridge triggers a saparate Lambda function daily.
- Lambda function assumes the IAM role
- Lambda function then interacts with the EC2 service to:
- Describe snapshots with the specified tag (zotec:component = UnattachedVolume90daydelete)
- Delete snapshots that are older than 90 days