0 votes
1 view
in AWS by (19.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)

os.remove(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 (44.6k points)

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

Related questions

0 votes
1 answer
asked Jul 23, 2019 in AWS by yuvraj (19.2k points)
0 votes
1 answer
0 votes
1 answer
asked Jul 23, 2019 in AWS by yuvraj (19.2k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...