Save_to_s3 refactored into controller function