Boto3 Error: botocore.exceptions.NoCredentialsError: Unable to locate credentials

后端 未结 12 2266
逝去的感伤
逝去的感伤 2020-11-30 23:00

When I simply run the following code, I always gets this error.

s3 = boto3.resource(\'s3\')
    bucket_name = \"python-sdk-sample-%s\" % uuid.uuid4()
    pri         


        
12条回答
  •  无人及你
    2020-11-30 23:38

    If you are looking for an alternative way, try adding your credentials using AmazonCLI

    from the terminal type:-

    aws configure
    

    then fill in your keys and region.

提交回复
热议问题