帮助在多个AWS环境之间轻松无缝切换的工具
aws-sessions-switcher的Python项目详细描述
aws会话切换器:管理多个aws会话并在它们之间无缝切换
如果必须在命令like中切换多个AWS帐户,有时会很困难 多个项目或同一项目的不同环境之间。在
aws-sessions-switcher
是我开发的一个工具,它可以帮助我自己更容易地在项目之间切换帐户/角色。
我不明白为什么这样一个工具对像我这样的人没有帮助,因此决定把它提供给每一个
可能会感兴趣。在
我希望有一天它能帮助别人!在
如果你有任何建议或想为这个工具作出贡献,你是非常欢迎的!在
PS:这是一个正在进行的工作,肯定有很多需要改进/优化的地方。在
安装:
pip install aws-sessions-switcher
基本设置
设置1:配置项目
^{pr2}$键入有关您的AWS环境的详细信息,您想担任的角色,项目名称等。。。
您可以通过执行aws-sessions-switcher projects add
命令来配置其他项目
设置2:更新AWS凭据文件
前面的命令将告诉您必须将AWS凭据放在默认的~/.aws/credentials
文件中的哪个概要文件名下
设置3:现在看看你能做的所有假设
运行aws-sessions-switcher
或aws-sessions-switcher -l
将告诉您如何承担使用此工具配置的不同角色!在
一些示例命令
command | description |
---|---|
^{ | Sets up the tool |
^{ | Deletes the configuration file created by this tool |
^{ | List all the assumptions that can be made |
^{ | Lists all the configured projects |
^{ | Lists all environments for all projects |
^{ | Lists only the environments configured for the project named ABCD |
^{ | Lists all the sessions you have created using this tool |
^{ | Gives the ability to switch between multiple sessions |
^{ | Add an additional project |
^{ | Deletes the configuration of the project named ABCD |
^{ | TODO: |
^{ | TODO: |
^{ | Attempts to assume 'admin' role on the 'dev' environment of the project named 'my_project' |
样本输出
配置您的第一个项目
您可以做出的所有假设
担任某个已配置项目的角色
所有活动会话
在活动会话之间切换
- 项目
标签: