This repository has been archived on 2025-04-27 . You can view files and clone it. You cannot open issues or pull requests or push a commit.
				
			
		
		
		
			
				
					
						
					
					bba3d6e81f37f87696905f51652031be12c961a1
				
			
			
		
	aws-target-group-cleanup
Remove ALB target groups that are not assigned to load balancers
Purpose
Clean up target groups that no longer have a load balancer assigned
Prerequisites
pip install boto3- Either an AWS role (if running on EC2) or an access key/secret key
 
Usage
Dry run mode:
python aws-target-group-cleanup.py -r us-west-2 -p myprefix
Removal mode:
python aws-target-group-cleanup.py -r us-west-2 -p myprefix -f
Where:
- -r is the region
 - -p is an optional prefix (ie. only remove target groups starting with this)
 - -f will turn on the removal (run in dryrun mode without this flag)
 
					Languages
				
				
								
								
									Python
								
								93.4%
							
						
							
								
								
									Dockerfile
								
								6.6%