Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

awsudo-py

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awsudo-py

A sudo-like tool to configure AWS environment variables and call programs

  • 0.1.2
  • PyPI
  • Socket score

Maintainers
2

awsudo CircleCI pypi

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

Poetry is necessary to install this project for development.

# install dependencies
make install

# linting
make typecheck
make fmt
# error on bad formatting
make fmt-check
make lint

# testing
make test
# runs fmt, typecheck, build
make all 

# building/publishing
make clean
make build
make publish
# build and install program directly
make install-program
make uninstall-program

# run program (we can't pass args to Make)
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.

projectawscli profilessession cachingSAMLlanguagepublished
this projectyesyesnopython3.6pypi
makethunder/awsudoyesyes*nopythongithub
electronicarts/awsudoyesyes⦿yesrubyrubygems
pmuller/awsudoyesnonopython2.7, python3.5pypi
ingenieux/awsudonononogolangno
meltwater/awsudoyesyesnobash, nodenpm, dockerhub

* supports session caching through older technique using awscli as a dependency

⦿ uses a daemon to cache sessions internally

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc