standard
turbot/aws_thrifty
- Detect & correct DynamoDB table with stale data
- Detect & correct EBS snapshots exceeding max age
- Detect & correct EBS volumes attached to stopped instances
- Detect & correct EBS volumes exceeding max size
- Detect & correct EBS volumes if unattached
- Detect & correct EBS volumes using gp2
- Detect & correct EBS volumes using io1
- Detect & correct EBS volumes with low IOPS
- Detect & correct EBS volumes with low usage
- Detect & correct EC2 application load balancers if unused
- Detect & correct EC2 classic load balancers if unused
- Detect & correct EC2 gateway load balancers if unused
- Detect & correct EC2 instances exceeding max age
- Detect & correct EC2 instances large
- Detect & correct EC2 instances of older generation
- Detect & correct EC2 instances without graviton
- Detect & correct EC2 network load balancers if unused
- Detect & correct EKS node groups without graviton
- Detect & correct Elasticache clusters exceeding max age
- Detect & correct EMR Clusters idle 30 mins
- Detect & correct Lambda functions without graviton
- Detect & correct RDS DB instances exceeding max age
- Detect & correct RDS DB instances of older generation
- Detect & correct RDS DB instances with low connection count
- Detect & correct RDS DB instances without graviton processor
- Detect & correct Route53 health checks if unused
- Detect & correct Route53 records with lower TTL
- Detect & correct S3 buckets without lifecycle policy
- Detect & correct SecretsManager secrets if unused
- Detect & correct VPC EIPs if unattached
- Detect & correct VPC NAT gateways if unused
Get Involved
Version
Overview
Amazon EC2 gateway load balancers with no targets attached still cost money and should be deleted. This query trigger identifies EC2 gateway load balancers with no targets attached and either sends notifications or attempts predefined corrective actions.
Getting Started
By default, this trigger is disabled, but can be configured by setting the variables:
ec2_gateway_load_balancers_if_unused_trigger_enabledshould be set totrue(default isfalse).ec2_gateway_load_balancers_if_unused_trigger_scheduleshould be set according to your desired running schedule.ec2_gateway_load_balancers_if_unused_default_actionshould be set to"notify"or any other desired action (e.g.,"notify"for notifications or"delete_load_balancer"to delete the gateway load balancers).
Then starting the server:
flowpipe serveror if you've set the variables in a .fpvars file:
flowpipe server --var-file=/path/to/your.fpvarsQuery
with target_resource as ( select load_balancer_arn, target_health_descriptions, target_type from aws_ec2_target_group, jsonb_array_elements_text(load_balancer_arns) as load_balancer_arn)select concat(a.name, ' [', a.region, '/', a.account_id, ']') as title, a.arn, a.region, a.sp_connection_name as connfrom aws_ec2_gateway_load_balancer a left join target_resource b on a.arn = b.load_balancer_arnwhere jsonb_array_length(b.target_health_descriptions) = 0Schedule
15mTags
category = Cost
class = unused
plugin = aws
service = AWS/EC2