Skip to content

This repo contains a script useful to clean docker images untagged from ECR repository older than n days. Moreover there is a Python Script that using boto3 library to create all lamba functions directly on AWS.

Notifications You must be signed in to change notification settings

tierratelematics/aws-registry-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AWS registry cleaner

This repo contains a script useful to clean docker images untagged from ECR repository older than n days. Moreover there is a Python Script that using boto3 library to create all lamba functions directly on AWS.

Usage

Edit create-lambda-function.py and decide how many days you want keep untagged images.

retention_days = 60

Moreover create a role for this lambda fuction with policy AmazonEC2ContainerRegistryPowerUser and substitute arn.

lambda_role = 'arn:aws:iam::345762685377:role/lambda_ecr_cleaner'

Once you have edit, launch from shell create-lambda-function.py script. The scheduler is once per day.

Requirements

  • python 2.7
  • boto3 library
  • aws command line configured with your credential

About

This repo contains a script useful to clean docker images untagged from ECR repository older than n days. Moreover there is a Python Script that using boto3 library to create all lamba functions directly on AWS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages