https://github.com/m-radzikowski/omf-plugin-asp
Oh My Fish plugin for switching between AWS profiles.
https://github.com/m-radzikowski/omf-plugin-asp
aws-cli aws-profiles fish fish-packages fish-shell omf omf-plugin shell
Last synced: 5 months ago
JSON representation
Oh My Fish plugin for switching between AWS profiles.
- Host: GitHub
- URL: https://github.com/m-radzikowski/omf-plugin-asp
- Owner: m-radzikowski
- License: mit
- Created: 2016-08-18T16:06:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-07-30T10:50:54.000Z (over 4 years ago)
- Last Synced: 2025-09-13T11:34:23.711Z (5 months ago)
- Topics: aws-cli, aws-profiles, fish, fish-packages, fish-shell, omf, omf-plugin, shell
- Language: Shell
- Homepage:
- Size: 19.5 KB
- Stars: 24
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

#### asp
> A plugin for [Oh My Fish][omf-link].
[![MIT License][license-badge]](/LICENSE)
[![Fish Shell Version][fish-badge]](https://fishshell.com)
[![Oh My Fish Framework][omf-badge]][omf-link]
Enables quick switching between AWS profiles.
## Prerequisites
- [AWS CLI](https://aws.amazon.com/cli/)
- [jq](https://stedolan.github.io/jq/)
- AWK
## Install
```fish
omf install git@github.com:mgoodness/plugin-asp.git
```
## Usage
### Set profile
```fish
asp [region]
```
`asp` - **A**WS **S**et **P**rofile
Sets `$AWS_PROFILE` and `$AWS_DEFAULT_PROFILE` variables.
The optional region value can be used if you wish to override the default region
configured for the profile.
### Get selected profile
```fish
agp
```
`agp` - **A**WS **G**et **P**rofile
Echoes `$AWS_PROFILE` and `$AWS_DEFAULT_REGION`.
### Clear selected profile
```fish
acp
```
`acp` - **A**WS **C**lear **P**rofile
Clears variables for selected profile and assumed role.
### Assume role
```fish
aar
```
`aar` - **A**WS **A**ssume **R**ole
Performs [STS Assume Role](https://docs.aws.amazon.com/cli/latest/reference/sts/assume-role.html) call
and sets obtained `$AWS_ACCESS_KEY_ID`, `$AWS_SECRET_ACCESS_KEY`
and `$AWS_SESSION_TOKEN` variables.
To clear assumed role variables execute either `acp`
or `asp` command.
# License
[MIT][mit] © [Michael Goodness][author] et [al][contributors]
[mit]: https://opensource.org/licenses/MIT
[author]: https://github.com/mgoodness
[contributors]: https://github.com/mgoodness/plugin-asp/graphs/contributors
[omf-link]: https://www.github.com/oh-my-fish/oh-my-fish
[license-badge]: https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square
[fish-badge]: https://img.shields.io/badge/fish-v2.2.0-007EC7.svg?style=flat-square
[omf-badge]: https://img.shields.io/badge/Oh%20My%20Fish-Framework-007EC7.svg?style=flat-square