1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

proxy環境下でboto3を使いたい

Posted at

タイトル通りの覚書です。

import boto3
from botocore.config import Config

#-- 1.proxy definitions
proxy_definitions = {
    'http': 'http://xxxx.com:xxxx',
    'https': 'https://xxxx.com:xxxx'
}

#-- 2.set config
my_config = Config(
    region_name='us-east-1',
    proxies=proxy_definitions
)

#-- 3.boto3 client
client = boto3.client('kinesis', config=my_config)

1でプロキシアドレス入力して,2で設定をして,clientを呼び出すときにconfigを引数として入力。
リージョン名もConfig内で指定可能。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?