In boto, I specified my credentials when connecting to S3 this way:
import boto
from boto.s3.connection import Key, S3Connection
S3 = S3Connection( settings.AWS_SERVER_PUBLIC_KEY, settings.AWS_SERVER_SECRET_KEY )
Then I could use S3 to perform my operations (in my case, removing an object from the recycle bin).
With boto3, all the examples I found are as follows:
import boto3
S3 = boto3.resource( 's3' )
S3.Object( bucket_name, key_name ).delete()
I cannot provide my credentials, so all attempts fail InvalidAccessKeyId.
How can I specify credentials with boto3?
source
share