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
Metadata
Release files for cdk-ecrpublic-gc 0.1.175
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cdk-ecrpublic-gc-0.1.175.tar.gz | 650.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cdk_ecrpublic_gc-0.1.175-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / cdk-ecrpublic-gc-0.1.175.tar.gz
| Download URL | cdk-ecrpublic-gc-0.1.175.tar.gz |
|---|---|
| Size | 650.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aecb4868323e70a25b1b494c3b2809ef1ecf2bf5edfdae0e5b9d11ad99f7c097
|
|
BLAKE2b-256 checksum How to use checksums |
f60179ce8762c587e672b092eb7aaa036cecd3c6dae4f9e093c4f84efa499099
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / cdk_ecrpublic_gc-0.1.175-py3-none-any.whl
| Download URL | cdk_ecrpublic_gc-0.1.175-py3-none-any.whl |
|---|---|
| Size | 648.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98abc428fff58980a020d953e989862f98c96ead45f47914b5d129ac5848d170
|
|
BLAKE2b-256 checksum How to use checksums |
320e31de9c442036fe27b907cd46a1261fab37d76f208b7639eef61acfa77834
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|