Skip to main content

Garbage collector for Amazon ECR public

Project description

NPM version PyPI version Release

cdk-ecrpublic-gc

CDK construct library that helps you build a garbage collector to delete all untagged images in Amazon ECR public with AWS CDK.

Why

Amazon ECR public does not have lifecycle policy to clean up all untagged images at this moment(see this issue). cdk-ecrpublic-gc allows you to deploy a AWS Step Functions state machine with dynamic parallelism to invoke an arbitrary of Lambda functions to remove untagged images to release the storage.

Schedule

By default, the state machine will be triggered every 4 hours and can be configured in the schedule property in the TidyUp construct.

Sample

# Example automatically generated from non-compiling source. May contain errors.
import aws_cdk.core as cdk
from cdk_ecrpublic_gc import TidyUp

app = cdk.App()

stack = cdk.Stack(app, "ecr-public-gc")

TidyUp(stack, "TidyUp",
    repository=["vscode", "gitpod-workspace", "github-codespace"
    ],
    schedule=events.Schedule.cron(hour="*/4", minute="0")
)

In Action

Step Function state machine with dynamic tasks in parallel

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdk-ecrpublic-gc-0.1.175.tar.gz (650.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdk_ecrpublic_gc-0.1.175-py3-none-any.whl (648.8 kB view details)

Uploaded Python 3

File details

Details for the file cdk-ecrpublic-gc-0.1.175.tar.gz.

File metadata

  • Download URL: cdk-ecrpublic-gc-0.1.175.tar.gz
  • Upload date:
  • Size: 650.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for cdk-ecrpublic-gc-0.1.175.tar.gz
Algorithm Hash digest
SHA256 aecb4868323e70a25b1b494c3b2809ef1ecf2bf5edfdae0e5b9d11ad99f7c097
MD5 5011629b4a5b4ec066658419896a6d4a
BLAKE2b-256 f60179ce8762c587e672b092eb7aaa036cecd3c6dae4f9e093c4f84efa499099

See more details on using hashes here.

File details

Details for the file cdk_ecrpublic_gc-0.1.175-py3-none-any.whl.

File metadata

  • Download URL: cdk_ecrpublic_gc-0.1.175-py3-none-any.whl
  • Upload date:
  • Size: 648.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

File hashes

Hashes for cdk_ecrpublic_gc-0.1.175-py3-none-any.whl
Algorithm Hash digest
SHA256 98abc428fff58980a020d953e989862f98c96ead45f47914b5d129ac5848d170
MD5 5902859e626415f56787f7620e4fb0d2
BLAKE2b-256 320e31de9c442036fe27b907cd46a1261fab37d76f208b7639eef61acfa77834

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page