I need to upload a csv diretly to AWS S3 with public access.
My current code is:
import boto3
s3 = boto3.resource('s3', aws_access_key_id='xxx', aws_secret_access_key='yyy')
s3.Bucket('test1234542').upload_file('C:/Users/output1.csv', 'output1.csv')
Unfortunately the permission is private and i dont know who to change to code to upload it with public access directly.
At the moment i have to go manually to the bucket, click on the folder "Permissions",click on "Public Access" and then make a tick at "Read object".
Does someone know a python code to add the public access permission?
Best Michi