aws-samples / service-screener-v2

A tool for customers to evaluate their AWS service configurations based on AWS and community best practices and receive recommendations on potential improvements.
Apache License 2.0
160 stars 44 forks source link

EC2Active check is misleading #110

Closed awswa closed 3 months ago

awswa commented 3 months ago

Describe the bug A clear and concise description of what the bug is.

EC2Active checks whether EC2 has not been running for more than 7 days. However, it checks if its CPU utilization is lower than 5%, which does not mean EC2 is not running. If EC2 is not running, we usually call it as Stopped status. Some customers who check this EC2Active got confused as their EC2 was still running with a low CPU utilization.

[code] if not results['Datapoints']: results['Datapoints'] = [{'Average': 0.0}] if results['Datapoints'][0]['Average'] < 5.0: self.results['EC2Active'] = [-1, 'Inactive']

There is another check called EC2LowUtilization to identify low utilization. Let's clarify these two checks and update the description of EC2Active accordingly.

To Reproduce Steps to reproduce the behavior:

  1. Clone Repo
  2. Setup Alias
  3. Run command

Full commands used to reproduce this bug e.g: screener --regions ALL --services rds,iam,ec2

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

AWS CloudShell (please complete the following information):

Execution Environment (PLEASE FILL THIS UP IF YOU ARE NOT RUNNING THIS IN AWS CLOUDSHELL):

Additional context Add any other context about the problem here.

cykhoo0108 commented 3 months ago

Disabled checks for EC2Active to revisit. Currently will use EC2LowUtilization