A sudo-like tool to configure AWS environment variables and call programs
Project description
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
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 Distributions
Hashes for awsudo_py-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83b1f9aab050538e8bb9fc514016c3672a1b1e75402d73ea8e1557fb2cafd62b |
|
MD5 | ab7b995169257d97f5680aaaf504cad8 |
|
BLAKE2b-256 | 076d54a6a0014fcea170181495c692e6873f4e419185ee1f4968e6a3826768a1 |
Hashes for awsudo_py-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad64542f5b99af7b1eb674cb5000408aae61b7f2a0d22a3bec6835f22f46224d |
|
MD5 | bac80da3a893b958969f100997f5e455 |
|
BLAKE2b-256 | 653207b2ecba8cc506155843347bd4833efd90500a73497c6b085fe078567e0c |