@@ -49,6 +49,12 @@ echo "random_string" > ~/.password_assume_role_encrypted
4949## Settings when open terminal (I am using iterm)
5050```
5151mkdir -p /opt/lamhaison-tools && cd /opt/lamhaison-tools
52+
53+ # Install helpful-commandlines
54+ git clone [email protected] :lamhaison/helpful-commandlines.git 55+ echo "source /opt/lamhaison-tools/helpful-commandlines/main.sh" >> ~/.bashrc
56+
57+ # Install aws-cli-utils commandlines
5258git clone https://github.com/lamhaison/helpful-commandlines.git
5359echo "source /opt/lamhaison-tools/aws-cli-utils/main.sh" >> ~/.bashrc
5460```
@@ -101,19 +107,35 @@ aws_secret_access_key=yyyyxxxxyyyy
101107## How to use
102108### AssumeRole
103109```
104- Hotkey: Ctrl + @ and press enter and choose the assume role that you want to use.
105- Enter functionname: aws_assume_role_set_name_with_hint
106-
110+ Hotkey (US keyboard layout) : Ctrl + @ (number 2) and press enter and choose the assume role that you want to use.
111+ Typing function_name: aws_assume_role_set_name_with_hint
107112```
108113### List all functions
109114```
110- aws_help
115+ Hotkey (US keyboard layout): Ctrl + h and you can search the funtion and enter to chose which commandline you want to run or edit before running.
116+ Typing function_name: aws_help (You only search the name function, can not select or edit funtion directly on console).
111117```
112118You can search list function and after that you can run which ` funtion_name ` to get the detail of bashshell code.
113119
120+ * You can search by a keyword
121+ ![ image] ( ./images/aws_help_search_menu.png )
122+
123+ * You can search by multi keywords with space seperately. Thank for Peco feature. It is pretty helplful.
124+ ![ image] ( ./images/aws_help_search_menu_keyword_seperated.png )
125+
126+
127+
128+
129+ ### List history and select the commandline that you want to re-run
130+ ```
131+ Hotkey (US keyboard layout): Ctrl + r and you can search the history commandlines and enter to chose which commandline you want to run or edit before running.
132+ ```
133+
134+
114135### Other
115136```
116- admin@MacBook-Pro-cua-Admin ~ % aws_assume_role_set_name PROFILE_NAME-dev
137+ source ~/.bashrc
138+ aws_assume_role_set_name PROFILE_NAME-dev
117139You set the assume role name PROFILE_NAME-dev
118140Running assume-role PROFILE_NAME-dev
119141MFA code: 165933
@@ -133,8 +155,8 @@ admin@MacBook-Pro-cua-Admin aws_cli_results % aws_ec2_list
133155+---------------------+---------------------------------+---------------+----------------+-----------+
134156| InstanceId | Name | PrivateIp | PublicIp | State |
135157+---------------------+---------------------------------+---------------+----------------+-----------+
136- | i-0512340c9dc5fb531 | demo-dev-jenkins-master | x.x.x.x | 1.123.123.123 | running |
137- | i-0712343f1a9565397 | demo-dev-mongodb-master | y.y.y.y | 1.123.123.123 | running |
158+ | i-0512340c9dc5fb123 | demo-dev-jenkins-master | x.x.x.x | 1.123.123.123 | running |
159+ | i-0712343f1a9565456 | demo-dev-mongodb-master | y.y.y.y | 1.123.123.123 | running |
138160+---------------------+---------------------------------+---------------+----------------+-----------+
139161```
140162
0 commit comments