Reputation: 1
Below is the code snippet. appreciate inputs on this
s3_resource = boto3.resource('s3')
object_file = s3_resource.Object(bucket_name=bucket_name, key=object_key)
file_size=object_file.content_length
print("Size of the file being processed:".format(file_size))
This code code prints blank output every time I try to print the file size
Upvotes: 0
Views: 177
Reputation: 12359
Change
print("Size of the file being processed:".format(file_size))
to
print("Size of the file being processed: {}".format(file_size))
Upvotes: 1