AWS Elastic Container Registry costs tend to grow over time - the more images you store, the higher the cost. There are ready-to-use solutions like ECR lifecycle policies but they are not checking if the images are still being used - it can be dangerous for your applications' health!
We decided to write our own ECR cleaner. It checks if images are still used by ECS, Lambda, or App Runner before removing:
https://github.com/devopsbox-io/aws-ecr-cleaner
This is another useful tool that we are publishing for free, enjoy!