A plugin for Oh My Fish.
Enables quick switching between AWS profiles. Supports both hard-coded keys (role will have to come later)
The machine which you are using should support following standard commands
grep
fgrep
$ omf install https://github.com/tanmng/omf-aws-asp.git
asp
- Set up AWS_DEFAULT_PROFILE environment variable to specify the profile you wish to use in subsequent commandsasc
- Clear all AWS-related environment variablesase
- Set upAWS_ACCESS_KEY_ID
,$AWS_SECRET_ACCESS_KEY
andAWS_DEFAULT_REGION
(in case your CLI utility doesn't support AWS profile)
Parameter:
profile_name
The name of the profile (set in~/.aws/config
) that we wish to set toAWS_DEFAULT_PROFILE
Set the value of AWS_DEFAULT_PROFILE
so that subsequent command can use the
appropriate profile.
Sample
$ asp test
Setting AWS_DEFAULT_PROFILE to test
- Sets
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
environment variables to the corresponding values from~/.aws/credentials
; - Sets
AWS_DEFAULT_PROFILE
environment variables to the corresponding values from~/.aws/config
.
Parameter:
profile_name
The name of the profile (set in~/.aws/config
)
Sample
$ ase aws-hs-searchnp
Setting AWS_DEFAULT_REGION to WAIT A SECOND, WHY SHOULD I PRINT THIS OUT AGAIN?
Setting AWS_ACCESS_KEY_ID to WAIT A SECOND, WHY SHOULD I PRINT THIS OUT AGAIN?
Setting AWS_SECRET_ACCESS_KEY to WAIT A SECOND, WHY SHOULD I PRINT THIS OUT AGAIN?
This command doesn't take any parameter
Remove all AWS-related environment variables (filtered by the RegExp AWS_[^=]+
- Use the value of
AWS_SHARED_CREDENTIALS_FILE
andAWS_CONFIG_FILE
if set - Support using
assume_role
for credentials