I\'m trying to use the AWS cognito service to authenticate and upload a file. I have been provided my regionType, identityPool, AWS account ID, and UnAuthRole. I also know the p
This question is really invalid because the authentication was failing not on creating a session but when trying to list the buckets.
Uploading and downloading from a specific bucket works fine with the above code but not the listing of all buckets.
# Upload a new file
data = open('test.jpg', 'rb')
s3.Bucket('mybucket').put_object(Key='test.jpg', Body=data)
# S3 Object
obj = s3.Object(bucket_name='mybucket', key='test.jpg')
response = obj.get()
data = response['Body'].read()
print len(data)