Proxy plugin for AWS CLI (based on https://github.com/nowak-ninja/awscli-s3-proxy)
Project description
awscli-plugin-proxy
This awscli plugin allows usage of proxy for AWS services as configured in profile configuration.
Installation
The easiest way to install awscli-plugin-proxy is to use pip
:
$ pip install awscli-plugin-proxy
You can also install the latest package from GitHub source which can contain changes not yet pushed to PyPI:
$ pip install git+https://github.com/cyralinc/awscli-plugin-proxy.git
or, if you install awscli
via Homebrew, which bundles its own python, install as following:
$ /usr/local/opt/awscli/libexec/bin/pip install awscli-plugin-proxy
Getting Started
Before using awscli-plugin-proxy plugin, you need to configure awscli first.
MUST: Once that's done, to enable awscli-plugin-proxy
plugin for S3, you can run:
$ aws configure set plugins.s3-proxy awscli_plugin_proxy
The above command adds below section to your aws config file. You can also directly edit your ~/.aws/config
with below configuration.
[plugins]
s3-proxy = awscli_plugin_s3_proxy
To add proxy configure to a profile (assuming you have a test profile), you can run:
$ aws configure --profile test set s3.proxy http://proxy-host.com:8080
The above command adds below section to your profile:
[profile test]
s3 =
proxy = http://proxy-host.com:8080
s3api =
proxy = http://proxy-host.com:8080
Now you can access S3 using proxy with profile:
$ aws s3 ls --profile test
If You want to use profile without passing it every time as parameter, use environment variable, ex:
export AWS_PROFILE=test
Alternative (classic) method
You can follow the guide by AWS which describes how to use proxy using system environment variables. Here is the example:
export http_proxy=http://proxy-host.com:8080
export https_proxy=http://proxy-host.com:8080
export HTTP_PROXY=http://proxy-host.com:8080
export HTTPS_PROXY=http://proxy-host.com:8080
Remember that after setting these variables, ALL
clients using this settings will be going through proxy!
Additionally, if You are using awscli on EC2 host, add NO_PROXY
variable to allow awscli communicate with metadata endpoint:
NO_PROXY=169.254.169.254
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file awscli-plugin-proxy-0.5.1.tar.gz
.
File metadata
- Download URL: awscli-plugin-proxy-0.5.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | faf60675b2e7c23e92daffe51c949861f031719c24697a4529775dfca0ed7b0d |
|
MD5 | 02e1493b8682208029015df8cbed9574 |
|
BLAKE2b-256 | ae768e44cb505d1a3da7ca87b5c2033fc6081e57ff1372404b599974cda8f462 |
File details
Details for the file awscli_plugin_proxy-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: awscli_plugin_proxy-0.5.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40271e0742a1023792d4c6538b7fe4a624f8b47869282bdbe3b5f410de77b3d4 |
|
MD5 | cca901bd94e29cf5474db617030189ca |
|
BLAKE2b-256 | 4768d5468e5e711789fb8f1e6d197759c83313eb3489cb0c3d0a6af5743d3c0f |