Close the file uploaded to s3.