Amazon AWS Cognito and Python Boto3 to establish AWS connection and upload file to Bucket

前端 未结 3 962
[愿得一人]
[愿得一人] 2021-02-06 08:57

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

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-06 09:33

    This is your error:

    File "./test.py", line 32, in 
    bucket = conn.get_bucket("elektradevbucket")
    

    This is your part of the code that references the bucket:

    bucket = conn.get_bucket("testbucket")
    '''
    s3 = boto3.resource('s3')
    for bucket in s3.buckets.all():
        print(bucket.name)
    s3.Bucket('testbucket')
    

    Are you sure you are running or calling the correct script?

    Best, -Iulian

提交回复
热议问题