Move S3 specific code to a service.