mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-12-01 21:03:02 +01:00
perf(aws): read profiles and region from config files instead of the CLI (#13537)
* perf(aws): read profiles from config files before falling back to the CLI `aws configure list-profiles` takes ~0.5s to start, and `asp`/`acp` tab completion runs it every time. Read ~/.aws/config and ~/.aws/credentials directly instead, and only call the CLI if neither file is readable. * perf(aws): read the profile region from the config file in asp `asp` ran `aws configure get region` on every switch, which takes ~0.5s, and the saved-state restore ran it in every new shell. Read the region from ~/.aws/config directly, and only call the CLI when the profile has no region there.
This commit is contained in:
1 parent
570bd64a56
commit
49766a713a
2 files changed
+45
-6
No files matched your search
@@ -35,7 +35,8 @@ plugins=(... aws)
|
||||
|
||||
* `aws_change_access_key`: changes the AWS access key of a profile.
|
||||
|
||||
* `aws_profiles`: lists the available profiles in the `$AWS_CONFIG_FILE` (default: `~/.aws/config`).
|
||||
* `aws_profiles`: lists the available profiles in the `$AWS_CONFIG_FILE` (default: `~/.aws/config`) and
|
||||
`$AWS_SHARED_CREDENTIALS_FILE` (default: `~/.aws/credentials`).
|
||||
Used to provide completion for the `asp` function.
|
||||
|
||||
* `aws_regions`: lists the available regions.
|
||||
|
||||
Reference in new issue
Block a user