Crates.io | raph |
lib.rs | raph |
version | 0.1.2 |
source | src |
created_at | 2024-01-29 06:54:45.280709 |
updated_at | 2024-02-07 10:44:46.588751 |
description | AWS Profile Handler and executor |
homepage | https://github.com/n-hass/raph |
repository | https://github.com/n-hass/raph |
max_upload_size | |
id | 1118495 |
size | 30,434 |
cargo install
will install a binary, _raph_bin
, and a script, _raph
. Note the installation is HARD CODED to install the _raph
executor script to $HOME/.cargo/bin
, so if you are using an alternate cargo install path, things will not work.
After installation, add this line to your shell .profile
or .rc
file:
alias raph="source _raph"
Usage: raph [OPTIONS] [profile] [command]...
Arguments:
[profile]
Specifies the AWS profile to use[command]...
An 'aws CLI' command to execute with the specified AWS profile, without affecting the current shell's environmentOptions:
-n, --no-auto-prefix
Disables automatic prefixing of the 'aws' commandProviding no arguments will activate the interactive profile switcher.
Providing the profile argument will skip interactive switching and perform the switch.
Providing the profile argument and a command will run this command once-off using the provided profile argument. This does NOT change the shell environment. If providing a command which does not start with 'aws', it will be automatically prefixed with 'aws'. This can be disabled with the -n
flag to run scripts.
raph profileA
- Uninteractively switch the shell environment to use profileA
raph profileB aws sso login
- run aws sso login
using profileB, leaving the AWS_PROFILE
environment variable intact.
raph profileB sso login
- same as above. It is not required to prefix the command with 'aws'.
raph profileB ~/my_script.sh --opt1 foo --opt2 bar extraopts
- will run ~/my_script.sh --opt1 foo --opt2 bar extraopts
verbatim, with AWS_PROFILE=profileB environment variable.