I am trying to upload a base64 image to an S3 bucket using Python.
I have googled and got a few answers but none of them works for me. And some answers use boto and not boto3, hence they are useless to me.
I have also tried this link: Boto3: upload file from base64 to S3 but it is not working for me as Object method is unknown to the s3.
Following is my code so far:
import boto3
s3 = boto3.client('s3')
filename = photo.personId + '.png'
bucket_name = 'photos-collection'
dataToPutInS3 = base64.b64decode(photo.url[23:])
What is the correct way to upload this variable dataToPutInS3 data to s3 bucket and get a url back from it?