I am trying to run a code snippet like this:
s3_file_path = "testunzipping/sample.csv.gz"
s3 = boto3.client('s3')
lst = s3.list_objects(Bucket='testunzipping')['Contents']
firstbucket = s3.Bucket('testunzipping')
but I am getting an error on the last line that:
"errorMessage": "'S3' object has no attribute 'Bucket'",
Later I am using the first bucket like this:
firstbucket.upload_fileobj(destination_file_gz, s3_filename)
What am I doing wrong? I also tried with bucket
instead of Bucket