2018. 9. 22.

Upload string to S3 with boto3 python

Upload string to S3 with boto3 python
# this code sometimes occurs error.  Body parameter is byte or file handle.
body_string = “abc..."
s3.client.Object(bucketname, key).put(Body= body_string) 

# using encode method. 
s3.client.Object(bucketname, key).put(Body=body_string.encode()) 


September 21, 2018 at 04:06PM

댓글 없음:

댓글 쓰기