Monday 4 March 2019

python aws proxy boto3

You can install all of below library from pyCharm
1. open pyCharm
2. File > Settings > Appearance & Behavior > System Settings > HTTP Proxy
3. Select "Manual proxy configuration"
4. Host name : "web-proxy.sg.hpicorp.net" . Port number "8080"
5. Click Apply button
6. File > Settings > Project:py-scripting > Project Interpreter
7. Click "+" mark on the top of right
8. search "boto3", "awscli" .....
9. install all

- command line installation.
Open Window Command
https://www.youtube.com/watch?v=6dXZM9SAFzg
C:\>easy_install pip
C:\>pip instal python3 (or python2)
C:\>pip install boto3
C:\>pip install awscli

C:\>python
import boto3
import os
os.environ["HTTP_PROXY"] = "http://web-proxy.sg.hpicorp.net:8080"
os.environ["HTTPS_PROXY"] = "https://web-proxy.sg.hpicorp.net:8080"
s3 =boto3.resource('s3')
for bucket in s3.buckets.all():
print(bucket.name)

(Press "Enter" two times )