2
S3에 파일을 업로드하기위한 샘플 코드를 참조하는 동안 다음 두 가지 방법.boto3.resource.put_object() 및 boto3.s3.transfer.upload_file()을 사용하여 S3에 파일 업로드의 차이점
사용 boto3.resource.put_object() :
s3_resource = boto3.resource('s3')
s3_resource.put_object(Bucket = BUCKET, Key = 'test', Body= b'some data')
사용 boto3.s3.transfer.upload_file() :
client = boto3.client('s3')
transfer = S3Transfer(client)
transfer.upload_file('/my_file', BUCKET, 'test')
나는 차이를 알아낼 수 두 가지 방법. 특정 사용 사례에서 다른 것을 사용하는 이점이 있습니까? 누구든지 자세히 설명해 주실 수 있습니까? 고맙습니다.