Another Big Update

Hey ,

A month ago, I posted CloudSlash, a tool to identify “zombie” infrastructure (unused NAT Gateways, detached EBS, Ghost EKS clusters) and i have been updating here on r/aws ever since. This time the entire core engine was rewritten to prioritize Safety. Here is what is new in V2

1. The Lazarus Protocol (Undo Button)

If you choose to delete a resource (like a Security Group), CloudSlash now snapshots the configuration _before_ generating the delete command.

It creates a `restore.tf` file containing the exact Terraform Import blocks needed to resurrect that resource in its original state. This removes the “what if I break prod” anxiety.

2. Mock Mode

A lot of you didn’t want to give a random GitHub tool read access to your account just to test it. Fair point.

You can now run `cloudslash scan --mock`.

It simulates a messy AWS environment locally so you can see exactly how the detection logic works and what the TUI looks like without touching your real keys or credentials.

3. Complete TUI Overhaul

- Topology View: Visualize dependencies (e.g., Load Balancer → Listener → Target Group).

- Interactive Region Picker: No more hardcoded regions. It fetches enabled regions dynamically.

- Deep Inspection: Press `Enter` on any resource to see the exact cost velocity and provenance (who created it).

4. Open Sourced Heuristics

I removed the “black box” nature of the detection. The README now contains a full Heuristics Catalog detailing the exact math used to flag a resource (e.g., “RDS is Idle if CPU < 5% for 7 days AND ConnectionCount == 0”). You can audit the logic before running it.

5. Graph Engine

3x faster graph traversal for large accounts ( > 500 resources ) . I refactored the engine to use flat slices instead of maps and implemented string interning for resource types, reducing RAM usage by ~40% on large graphs.

Other Improvements since v1.3:

- Headless Mode: `cloudslash scan --headless` is now fully stable for CI/CD usage.

- Graph Engine: 3x faster graph traversal for large accounts (>500 resources).

- Completion Scripts: Native bash/zsh/fish auto-completion.

- **Validation:**Strict tag-based overrides (`cloudslash:ignore`) are now respected deeper in the graph.

andd manyyy moreee

License: Still AGPLv3 (Open Source). No paywalls.

Install:

```bash

curl -sL https://raw.githubusercontent.com/DrSkyle/CloudSlash/main/scripts/install.sh | bash

```

Repo: https://github.com/DrSkyle/CloudSlash

btw parsing AWS graphs is complex, so if you hit any weird edge cases or bugs , please let me know , i plan to fix them immediately

Stars are always appreciated :slight_smile:

:slight_smile: DrSkyle


Related discussions:

What are some good resources for evaluating a move from ECS classic to either Fargate or EKS
RDS instances keep starting from a stop
Anyone getting EKS invitations?
AWS Inventory on a single HTML page
Which Class helped you pass DevOps Pro Certification. ACloudGuru or Linux Academy?
Creating a CI/CD pipeline with a git repository in ~30 seconds using Terraform and AWS
Can AWS make something like a miniature private Twitch?
I hope EKS is going GA tomorrow!
Looks like EKS is going GA tommorow
When to create a new RDS instance vs create a new db in existing instance?
Terraform question - regarding pre-existing infrastructure
The re:Invent Team – Ask the AWS Experts – November 14th @ 11AM PST / 2PM EST
Recommended AWS Service to Use for Multiple Scheduled One-Time Execution
Is it just me or is aws is a nightmare for beginners?
ECS Vs. EKS Vs. Fargate: The Good, the Bad, the Ugly Infographical comparison post
New AWS Solutions: reference architectures and automation catalog
Former2 - Generate CloudFormation / Terraform / Troposphere templates from your existing AWS resources
Getting first SAA job.
Amazon EKS Windows Container Support now Generally Available
Make a move to DevOps?
Feedback request - getting started experience with AWS products
No internet access with NAT Gateway on a Private Subnet
How we run EKS with spot instances but fallback to on-demand
How to shutdown the EKS cluster without destroy cluster
Anyone else having problems with timeliness on billing issues?
Reminder - New S3 Buckets after 9/30/2020 won't support Path-Style Requests
Aurora segfaulting
EKS Managed Node Groups, the good, the bad and the config
Host production environment in AWS while hosting Staging and Development environments on a dedicated (home) server
New job, splitting my time between Senior Engineer and DevOps... Super new to AWS, help!
EKS Anywhere is GA
Do you run infrastructure deployment alongside app deployment?
Elasticbeanstalk environment extremely fragile?
Fully automated Kubernetes (K8s) deployment on AWS using mixed on-demand and spot instances
Viewing all resources deployed by Terraform
Delete old amc certificate and it’s associations with other resources
Anyway to automatically add ALBs as origin to Cloudfront?
Fun reason to set up MFA. Here’s a list of suspect IP’s that have tried brute forcing my root.
RTO/RPO strategies for an AWS account that needs to support regions going down
What's the difference between a nat instance and a nat gateway?
Amazon EKS now support Kubernetes version 1.25
Important Information about NAT Gateway in your Account emails
How to properly scale to 0 (and save costs) in EKS?
SES with custom Mail-From, only being used 40-50% while sending (50-60% SPF unaligned)
cloudgrep: grep for cloud storage
CI/CD workflow for freelance work?
AWS wants to start charging for all allocated IPv4 usage, yet most of their critical services don't support native IPv6
Free resource: Hand drawn sketch –> professional diagram + Terraform code
Infrastructure as Code (IaC) usage within AWS?
Which observability stack would u choose?
VPC endpoints for ECR not working in private subnet
How do I obtain the least amount of privileges for deploying specific infra to AWS with terraform?
CDK vs terraform
ECS Running Service Terraform vs Console
Are tools like terraform and CDK always used or do people create stuff manually in professional environments?
CodeCommit future?
Build a tool for my niche use case which allows you quickly search for all available Cloudtrail event name
How does your Org keep track of your AWS clouds in the Management Console?
Possible AWS keys exposure
Tool for generating Terraform code for AWS from visual diagrams (2025)
EKS 1.30 going into extended support already?
Terraform provider to build and push Docker images to ECR
Upcoming SDev Online Assessment - can't finish coding problems w/in 45 time limit
Multiple environments under one EKS control pane
is aws cdk actually simplifying infra as code, or just adding another abstraction headache?
How far should Terraform go for AWS org setup
Amazon EKS introduces Provisioned Control Plane
Support: How to bypass Artificial Idiot and get a Human Being on wire?
Centralized CI/CD security scanning for 30+ repos. Best practices?
Production down 14 days. AWS wants bank statement for virtual card that doesn't have one.
Support tickets are unattended
Route 53 Issue, not getting help from support
EKS failure mode: How a bad Corefile update was accepted by the EKS CoreDNS add-on and caused an outage two days later
IT Infrastructure Automation
AWS announces Network Firewall and NAT Gateway association capability
How do you auto-snapshot your EBS volumes?
My thoughts so far on the AWS DEVOPS Engineer Professional level cert
Taking the Associate Solutions Architect Tomorrow. Sweating bullets. Any last minute advice?
My tips on the AWS Professional DevOps Engineer Certification
Migrating from NAT Instance to NAT Gateway
Terraform Gotchas And How We Work Around Them (on AWS)

I need to do a scan just for unused ebs volumes and Ami unused and older than 3 months. Nothing very complicated but quite tedious

Is this tool easy enough to use on such a small configuration?

Sorry to interrupt to the author’s post but for the specific case it sounds like an overkill to me.
I can suggest steampipe, an open source tool which you can SQL query your cloud infrastructure.

I hate what I’m about to type, but its the world we live in right now. Your question sounded perfect for a powershell and AWS CLI solution. So I simply asked ChatGBT:

“write me a powershell script that uses the AWS CLI to run through 3 aws accounts and find all the unattached EBS volumes”

And it pretty much nailed it. I then asked :

“now write another powershell script but this time if looks for AMI that are older than 3 months”

and yup, it got it. I leave this exercise up to you.