全部, 我收到以下错误,使用boto3访问s3
EndpointConnectionError:
Could not connect to the endpoint URL: "https://s3.amazonaws.com/"
我遵循了以下步骤。
为该用户生成访问密钥,并使用以下代码:
from boto3 import client
from pandas import read_csv
acc_key = read_csv("accessKeys.csv") # access key file
ACCESS_KEY = acc_key.loc[0,"Access key ID"]
SECRET_KEY = acc_key.loc[0,"Secret access key"]
client_access = client(
's3',
aws_access_key_id=ACCESS_KEY,
aws_secret_access_key=SECRET_KEY,)
client_access.list_buckets() # giving the error here
尝试在region_name
方法中添加client
,但没有用。
我错过了什么吗?