Some S3-related stuff, which should probably go somewhere else