AWS Elastic Container Service (ECS) is often used as a platform for Microservices on AWS.Unused container images in AWS Elastic Container Registry (ECR) can accumulate and result in wasted space and costs.An automated approach is presented to automatically clean up ECR repositories, removing old images not used by ECS services.The solution leverages AWS Config Aggregator, EventBridge, and EventBridge Scheduler to efficiently manage image deletion based on active ECS tasks.