Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k 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.4k 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.1k points)

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
asked Jul 23, 2019 in AWS by yuvraj (19.1k points)

Browse Categories

...