Logging to Amazon S3
You can try to write a custom appender
for logback
or log4j2
and use this appender in respective configuration.
This way, you don't have to write an entire logging framework, but only the part you need and use the rest from a working framework.
There are also a few of them on github. For instance: shuwada/logback-s3
There is a plugin for fluentd that stores files to s3. (Fluentd is a nice "log file collector")
Read more about it here: https://docs.fluentd.org/output/s3
If the s3 connection is down or slow it will buffer the output for you.