0 votes
1 view
in AWS by (18.2k points)

Is boto3.Bucket.upload_file blocking or non-blocking?

i.e. if I were to run the following

bucket = session.Bucket(bucket_name)

bucket.upload_file(Key=s3_key, Filename=source_path)


Do I have a race condition, depending on the size of the file? Or is upload guaranteed to complete before file deletion?

1 Answer

0 votes
by (42.5k points)

The current boto3 upload_file is blocking. To be safe, add some error handling in the code.

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !