split s3_file into resource and provider