1 Answer
- Newest
- Most votes
- Most comments
0
There is no such thing as an image in use. ECS will download the image from the ECR when the container is launched. There is no way to tell what images are in use im afraid.
The only way you "could" do this is with some custom automation using somthing like a lambda or step function. To list all your task definitions which are in use, grab the container image SHA/tag thats in use. Then list all images in the ECR and delete the ones older than 60 days but exlude the ones in the list of in use.
Relevant content
- AWS OFFICIALUpdated 2 years ago