This is the open source Ruby gem that we use to rotate log files from our AWS EC2 instances to S3.