У меня есть файлы с разными именами в корзине s3.
Я хочу посчитать, сколько csv со словом 'member' находится в моем ведре?
Однако к файлам-членам прикреплен UUID, например:
member_asldf2323209.csv
Я пробовал это сделать до сих пор:
import boto3
# create the s3 resource
s3 = boto3.resource('s3')
# get the file object
obj = s3.Object('bucket_name', 'key')
# read the file contents in memory
file_contents = obj.get()["Body"].read()
# print the occurrences of the new line character to get the number of lines
print file_contents.count('\n')
это дает мне только одного участника'файл без UUID.