By default when there is no region set:
```
$ asp <my-profile>
$ env | grep -i aws
AWS_DEFAULT_PROFILE=<my-profile>
AWS_PROFILE=<my-profile>
AWS_EB_PROFILE=<my-profile>
AWS_REGION=
AWS_DEFAULT_REGION=
```
we get this error for this command if we are using regional STS endpoints:
```
$ aws sts get-caller-identity | jq .Arn
Invalid endpoint: https://sts..amazonaws.com
```
This PR ensures that a default region is always set. By default comes from `default` profile configuration, and defaults to `us-east-1`
* fix(aws): don't duplicate aws_prompt_info function in RPROMPT
* refactor(aws): clean up logic in acp function and fix session duration input
Fixes#9409
Previously, the plugin only supported MFA for profiles that had a role to assume, specified in role_arn. Now, the plugin supports MFA for profiles without a role to assume.
Closes#9408
* refactor(aws plugin): remove dependency on jq
Previously, acp command relied on jq. Now that dependency has been removed, as well as some linter suggestions implemented.
* Added role delegation support and MFA support as per IAM Best Practices
* fix: grep with color enabled breaks profile parsing
* fix: compatible with MacOS basic sed
* docs: Added jq as a dependency
* feat: added variable session duration, if the role to be assumed permits it.
* bug: incorrect assigment for session length
* fix: profile extraction failed with some versions of sed
Fixed the issue that resulted from merging upstream changes to allow "." in the profile name
* fix: broken profile parsing when profile name contains "@"
Closes#9122
The current check is assuming that the aws_completer is installed
globally, it then runs the command without that path
I have aws_completer in ~/.local/bin/aws_completer
This changes the check to see if the command exists instead of
concerning itself with where it in installed. This test matches the
behavior of just running the command.
* Update the AWS plugin to support disabling RPROMT display:
Use a $SHOW_AWS_PROMPT option.
* Refactoring aws plugin:
Exposing customizable aws_prompt_info function to be used in themes.
* Set aws prompt prefix and suffix to original values and fix README
Co-authored-by: "Vassilis S. Moustakas" <vsmoustakas@gmail.com>