You are not the only one trying to achieve this goal: serve file system by S3 interface. There are also https://github.com/versity/versitygw and https://rclone.org/commands/rclone_serve_s3/.
I also asked claude to roast it for fun. this one made me lol:
> The use case is Chef's Kiss levels of overengineering. They want to avoid Git commits... so they built a custom S3 server... that runs in a container... that gets rebuilt on every NixOS rebuild... to serve static files... to FluxCD. At some point, just make the damn Git commits.