Closed globetrotter2796 closed 10 months ago
Try adding this line to your bash script shopt -s expand_aliases
.
I spent a while on this error and found this fixed it.
See here for explaination https://www.thegeekdiary.com/how-to-make-alias-command-work-in-bash-script-or-bashrc-file/
closing -- considering as resolved
After the awsume command is applied it gives the following error:
I am trying to run a shell script, which uses AWSUME inside the shell script to assume role i to multiple accounts one by one in the script,
ISSUE:
Warning: the awsume shell script is not being sourced, please use awsume-configure to install the alias Session token will expire at 2022-06-18 02:03:46 [AWS-account-role} Role credentials will expire 2022-06-17 15:09:50
/opt/homebrew/bin/awsume: line 183: return: can only `return' from a function or sourced script An error occurred (InvalidClientTokenId) when calling the ListUsers operation: The security token included in the request is invalid.
But if i assume a role individually to an account it works fine.