We shouldn't need to instantiate the S3 connection each time. Can you instantiate it in the top-level method and pass it as an argument to the functions that perform actions on S3?