In case you’ve missed it, AWSume is a cross-platform AWS command-line tool that makes working with the AWS CLI under different profiles or roles super easy. You no longer have to manually set environment variables, or pass the
--profile <profile_name> to the end of your AWS CLI calls. When you have your profiles correctly set up, you can simply run
awsume <profile_name>, and AWSume will do the work for you!
We have moved the core of what AWSume is from the shell scripts into the Python script
awsumepy. But why?
- Because AWSume works through setting environment variables, we still need small
awsume shell wrappers for each platform we support. However, since the work has been taken from the shell and put on Python, maintaining these shell scripts is much easier.
- AWS CLI取决于Python
- 由于AWS CLI依赖于Python，因此有必要在Python中创建一个AWS CLI工具。
- AWSume being run in Python is incrementally faster than it’s 预先vious shell script counterparts.
- AWSume现在非常易于安装，只需要一个命令：<pre><code>pip install awsume</code></pre>
AWS role credentials are only valid for a maximum of an hour. This means that you need to call AWSume once for every hour that you work under that role. Now, we have developed an AWSume auto-refresher! By simply passing the
-a option to AWSume with the given role, you’ll spawn a background process that refreshes roles that are about to expire, for as long as the role’s source profile’s credentials are valid. Once there are no more roles to refresh, autoAWSume stops running.