I'm trying to create a presigned url that will help some customers to upload files . Here my test script that is currently working
# Get the service client.
s3 = boto3.client('s3')
boto3.set_stream_logger(name='botocore')
# Generate the URL to get 'key-name' from 'bucket-name'
url = s3.generate_presigned_url(
ClientMethod='put_object',
Params={
'Bucket': s3_bucket_name,
'Key': test_key,
}
)
files = StringIO("asdfasdfasdf")
response = requests.put(url, data=files)
print(str(response.content))
Run Code Online (Sandbox Code Playgroud)
But if I'm adding:
`ACL': 'public-read'
Run Code Online (Sandbox Code Playgroud)
to Params (or add some metadata following the information in the put_object documentation …