How to track unused resources in AWS?

I have been using AWS for a while. I always have difficulty tracking AWS resources and their relationship. Obviously, I am using Terraform, but there are still special operations that reduce my visibility.

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

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

Tool suggestions are also welcome.

Also posted on DevOps . Held here, as there are fewer people.

+5
source share
3 answers

I think the viable answer here is the same as the popular answer when autoscaling is to use CloudWatch alerts .

Whenever you have a service that needs to be scaled automatically, you do something like a monitor for a high level of processor performance . If the processor load exceeds a certain threshold, the alarm can be set to increase your fleet. Accordingly, if the CPU usage falls below a certain threshold value, an alarm can be configured to reduce the scale of the fleet. Other alarms, such as memory, disk usage , etc., can be configured with similar alarms.

So, instead of setting up CloudWatch alarms to scale or scale your fleet, you can simply set up a CloudWatch alarm to email you when the host becomes inactive (for example, CPU usage is too low ).

+4
source

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

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

+3
source

Like Janitor Monkey, I created a tool to track various types of unused resources (ELB, EBS, AMI, security groups, etc.): https://github.com/romibuzi/majordome

0
source

Source: https://habr.com/ru/post/1275262/


All Articles