在旧的boto
库中,在打开连接时可以使用proxy
、proxy_port
、proxy_user
和proxy_pass
参数。但是,我无法找到任何类似的方法,以编程方式在boto3上定义代理参数。:(
发布于 2017-08-03 18:39:28
至少在1.5.79版本中,botocore在botocore配置中接受一个proxies
参数。
例如:
import boto3
from botocore.config import Config
boto3.resource('s3', config=Config(proxies={'https': 'foo.bar:3128'}))
boto3 resource https://boto3.readthedocs.io/en/latest/reference/core/session.html#boto3.session.Session.resource
botocore配置 https://botocore.readthedocs.io/en/stable/reference/config.html#botocore.config.Config
https://stackoverflow.com/questions/33480108
复制相似问题