ucopacme / aws-shelltools Goto Github PK
View Code? Open in Web Editor NEWsome scripts to manage AWS profiles and cross-account sessions
License: MIT License
some scripts to manage AWS profiles and cross-account sessions
License: MIT License
Might want to consider putting a note in the readme about the version of python/pip required, or at least the version(s) this has been tested on. There's a lot of old python out there. I haven't been able to get this set up in python2.7 on Ubuntu 16.04 LTS. Are you using python3?
after using aws-assume-role to one of my profiles, when I run aws-whoami, I only see the account Id of the assumed role. the session name does not include the account alias.
`(python3.6) agould@horus:~/.aws/config.d> aws-assume-role seg-master
(python3.6) agould@horus:~/.aws/config.d> aws-whoami
{
"UserId": "AROAJUGOYFMFCF3O6K4JY:agould@OrgAdmin",
"Account": "327017052424",
"Arn": "arn:aws:sts::327017052424:assumed-role/OrgAdmin/agould@OrgAdmin"
}
`
when running aws-make-config, I should be able to say what profile to source and what config file to create. with aws-assume-role, i should be able to specify a per-organization profile and only see roles for that org.
aws-profile org1
aws-make-config
aws-profile org2
aws-make-config
I should now have 2 config files, one per org.
aws-profile org1; aws-list-roles - should only show roles fro org1
aws-profile org2; aws-assume-role org1-role should fail with profile not found, not access denied
When running aws-make-config, got the following:
/home/xxx/blue/lib/python3.6/site-packages/aws_shelltools/awsconfig.py:78: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
deployed_accounts = yaml.load(body)
really? I merged a new func without testing?
Tim idea to rename
aws_shelltools> aws-assume-role seg-auth
Traceback (most recent call last):
File "/home/agould/python-venv/python3.7/bin/awsassumerole", line 11, in
load_entry_point('aws-shelltools', 'console_scripts', 'awsassumerole')()
File "/home/agould/git-repos/github/ucopacme/aws-shelltools/aws_shelltools/awsassumerole.py", line 164, in main
res = assume_role_from_profile(args)
File "/home/agould/git-repos/github/ucopacme/aws-shelltools/aws_shelltools/awsassumerole.py", line 139, in assume_role_from_profile
config = load_aws_config(args)
File "/home/agould/git-repos/github/ucopacme/aws-shelltools/aws_shelltools/awsassumerole.py", line 86, in load_aws_config
config.read(f)
File "/usr/local/lib/python3.7/configparser.py", line 696, in read
self._read(fp, filename)
File "/usr/local/lib/python3.7/configparser.py", line 1014, in _read
for lineno, line in enumerate(fp, start=1):
File "/usr/local/lib/python3.7/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9f in position 17: invalid start byte
/home/agould/.aws/config /home/agould/.aws/config.d/config.aws_shelltools /home/agould/.aws/config.d/.config.aws_shelltools.swp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.