user7161651
user7161651

Reputation:

How to track unused resources in AWS?

I have been using AWS for a while now. I always have the difficulty tracking AWS resources and how they are interconnected. Obviously, I am using Terraform but still, there is always ad-hoc operations that cut down my visibility.

Since I have been charged multiple times for resources/services that are present but not used by me.

Unused services include resources that are not pointing to other services but present in the AWS environment.

Tools suggestions are also welcome.

Also, posted on DevOps. Posting here since there are fewer people there.

Upvotes: 9

Views: 5582

Answers (5)

Jatin Mehrotra
Jatin Mehrotra

Reputation: 11634

Update 2024: Now you can find resources while are idle using AWS Compute Optimizer

Ref: https://aws.amazon.com/about-aws/whats-new/2024/11/aws-compute-optimizer-idle-resource-recommendation/

Upvotes: 0

Serhii Kuyanov
Serhii Kuyanov

Reputation: 11

I also had this question, so I decided to write a simple Go application that can find unused services in all regions. You can find it here:

https://github.com/ku9nov/aws-explorer

At the moment, it doesn't search for many resources, but those that can be lost and forgotten. It's especially useful for cost savings and maintaining order.

Upvotes: 0

Romibuzi
Romibuzi

Reputation: 194

Similar to Janitor Monkey, I've created a tool to track different types of unused resources (ELB, EBS, AMI, Security groups, etc) : https://github.com/romibuzi/majordome

Upvotes: 0

Sudharsan Sivasankaran
Sudharsan Sivasankaran

Reputation: 5897

I have used Janitor Monkey, Cloud Custodian and we do have a bunch of AWS Config + Lambda for cleaning up.

Janitor Monkey determines whether a resource should be a cleanup candidate by applying a set of rules on it. If any of the rules determines that the resource is a cleanup candidate, Janitor Monkey marks the resource and schedules a time to clean it up.

Upvotes: 4

Jon Thoms
Jon Thoms

Reputation: 10797

I think that a viable answer here is the same as the popular answer for when to auto-scale - use CloudWatch alarms.

Whenever you have a service that you need to auto-scale up, you do something like monitor for high CPU. If the CPU usage trips some threshold, the alarm can be configured to scale up your fleet. Correspondingly, if CPU usage goes below some threshold, the alarm can be configured to scale down the fleet. Similar alarms can be configured other alerts like memory, disk usage, etc.

So, instead of configuring CloudWatch alarms to scale up or scale down your fleet, you can just configure a CloudWatch alarm to email you when a host becomes idle (e.g. it's CPU usage is too low).

Upvotes: 3

Related Questions