Implements S3 to store images