Skip to content

tweedge/s3-recycler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

s3-recycler

DockerHub Link License Written By Author Also Writes On

Not all S3 providers have automatic deletion capabilities, so this is an inefficient little sidecar to list out and delete all files in an S3 bucket periodically. It's also a little playground I used to learn about building distroless images.

Config

Required environment variables to set are:

  • S3_BUCKET - ex. mybucket, what the name of your bucket is
  • S3_REGION - ex. us-east-1, what region your bucket is in
  • S3_ENDPOINT_URL - ex. https://s3.us-east-1.amazonaws.com, your S3 provider's API
  • S3_ACCESS_KEY_ID - ex. AKIA..., your access key ID
  • S3_SECRET_KEY - ex. wJal..., your secret key
  • RECYCLER_SLEEP - ex. 3600, how long to sleep (in seconds) before deleting all known objects

Optional environment variables to set are:

  • RECYCLER_STARTUP_HOLD - ex. 60, how long to sleep (in seconds) when the container first starts
  • RECYCLER_SKIP_N_ITEMS - print a message every n deleted items

About

Not all S3 providers have automatic deletion capabilities, so this is an inefficient little sidecar to approximate that for one of my services at home.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors