awsudo
A sudo-like tool to configure AWS environment variables and call programs
This script is useful for programs like Terraform, which doesn't support MFA when assuming roles.
Installation
python3 -m pip install awsudo-py
Usage
$ awsudo -p administrator@staging terraform apply
$ awsudo -p administrator@staging env | grep AWS
AWS_ACCESS_KEY_ID=AKIAIXMBKCITA257EHIQ
AWS_SECRET_ACCESS_KEY=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
usage: awsudo [-h] [-p PROFILE] PROG [ARG [ARG ...]]
Set environment variables using profile
positional arguments:
PROG executable to run
ARG args to run with program
optional arguments:
-h, --help show this help message and exit
-p PROFILE, --profile PROFILE
AWS Profile to assume
Development
# install dependencies
poetry install
# run program
poetry run awsudo
Prior Art
There are a lot of similar programs to this one. I believe makethunder/awsudo and electronicarts/awsudo are the best alternatives. The only problems with makethunder/awsudo are that it isn't published on pypi and that it doesn't use the newest api for caching sessions. electronicarts/awsudo has all of the features, but it uses an internal session cache, instead of sharing with awscli. If you need SAML support though, the internal cache is a necessary compromise, so this package is great in that case.
| project | awscli profiles | session caching | SAML | language | published |
|---|---|---|---|---|---|
| this project | yes | yes | no | python3.6 | pypi |
| makethunder/awsudo | yes | yes* | no | python | github |
| electronicarts/awsudo | yes | yes⦿ | yes | ruby | rubygems |
| pmuller/awsudo | yes | no | no | python2.7, python3.5 | pypi |
| ingenieux/awsudo | no | no | no | golang | no |
| meltwater/awsudo | yes | yes | no | bash, node | npm, dockerhub |
* supports session caching through older technique using awscli as a dependency
⦿ uses a daemon to cache sessions internally
Metadata
Release files for awsudo-py 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| awsudo-py-0.1.1.tar.gz | 15.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awsudo_py-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.8 kB
Release files / awsudo-py-0.1.1.tar.gz
| Download URL | awsudo-py-0.1.1.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0f149e2ae3fc12ca0ea1d45033511dc83d377f630985b4cd00f081130ee810d
|
|
BLAKE2b-256 checksum How to use checksums |
6ee14c90d786aafea7bad09aa4b2bc06ee4969f9afab08ca15df8c32cf7b72c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.10 CPython/3.7.0 Darwin/17.7.0
|
Release files / awsudo_py-0.1.1-py3-none-any.whl
| Download URL | awsudo_py-0.1.1-py3-none-any.whl |
|---|---|
| Size | 41.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7bc329cf096d0664f911d5ab3d5a7aa0334992bd7ff91a316db8c4279db8190
|
|
BLAKE2b-256 checksum How to use checksums |
8a793d9d31af227af5cd2279b317a39a36f093c1fa7589f6a87b03060fe33b21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.10 CPython/3.7.0 Darwin/17.7.0
|
Security for awsudo-py 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.