[Browser Extension] Python3 and Boto3 Help

Discussion in 'mTurk Scripts & Resources' started by gw1500se, Jul 31, 2022.

  1. gw1500se

    gw1500se New Turker

    Messages:
    2
    Ratings:
    +0
    I’m just getting started with boto3 and AWS. I found this article and tried the sample code. I don’t know if the sample code is wrong or if I need to be looking at something else. The bottom line is that the ‘for’ loop outputs nothing and I do not get any errors. Apparently ‘s3.buckets.all()’ returns nothing. Is there a better, more accurate tutorial for getting started with boto3? TIA.

    import boto3

    s3 = boto3.resource('s3')

    for bucket in s3.buckets.all():
    print(bucket.name)
     
  2. gw1500se

    gw1500se New Turker

    Messages:
    2
    Ratings:
    +0
    I think I have figured out the problem. My mturk and AWS accounts are not linked. I cannot find documentation on how to link the two existing accounts that works. Can someone help? TIA.