Reputation: 31
to perform an ingestion of data retrieve from the internet and put them on a s3 bucket from an EC2 I need to use a proxy for the internet connection, but not for S3, and if I use my http_proxy and https_proxy variables, the s3 client also uses the proxy.
is it possible when creating the S3 client, to tell him not to use the proxy ?
Upvotes: 3
Views: 4672
Reputation: 4476
Put S3 domain on no_proxy
environment variable.
export no_proxy=s3.amazonaws.com
Upvotes: 2
Reputation: 38982
Configure proxies in the client to an empty dictionary. https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html
import boto3
from botocore.config import Config
config = Config(proxies={})
s3 = boto3.resource('s3', config=config)
Upvotes: 2