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 without compilation. See https://github.com/aws/jsii/issues/826
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.83.tar.gz (649.5 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.83-py3-none-any.whl (648.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cdk-ecrpublic-gc-0.1.83.tar.gz
  • Upload date:
  • Size: 649.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.10

File hashes

Hashes for cdk-ecrpublic-gc-0.1.83.tar.gz
Algorithm Hash digest
SHA256 db8a595fc1438d92e6fd9853d36890434fd1a2a28a76a00eff997f47b553dade
MD5 40d86b30e9a8642c30fcbddf8082bbd5
BLAKE2b-256 2c9e1196f3987baf4fe0247b11d7d1e4dfbbce6cad9fbce34a0f74dc27bd5250

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cdk_ecrpublic_gc-0.1.83-py3-none-any.whl
  • Upload date:
  • Size: 648.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.10

File hashes

Hashes for cdk_ecrpublic_gc-0.1.83-py3-none-any.whl
Algorithm Hash digest
SHA256 3fc2b802967a07b7ad89c9aff8b495767df6348fffb6ed25b8ee1404614b60d6
MD5 6a63e920824aecc2de128c76d79f87bb
BLAKE2b-256 6ba716271d8cc96639425a1a1459b2a72346ff41be3a072e2f0937d6bcc4046f

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