Simple python script to loop through all files in an S3 Endpoint and delete excess files based on a retention amount.
Retention ammount: 5
## Development
Python 3.12 should be used for development and ideally a virtual environment should be used. With the source checked out run the following command to create a virtual environment.
```bash
python3 -m venv ./
```
The required packages can be installed by running the following command after activating the virtual environment.
```bash
pip install -r requirements.txt
```
If new packages are installed, the requirements file can be updated by running the following command.
```bash
pip freeze > requirements.txt
```
## Usage
The S3 Recent File Cleaner is best run as a once off docker image. The image is already built so can be run with the following command.