okta-aws-cli-assume-role icon indicating copy to clipboard operation
okta-aws-cli-assume-role copied to clipboard

okta-aws passing profile name twice to aws CLI

Open dangeReis opened this issue 2 years ago • 3 comments

Describe the bug On MacOS (and probably other linux), it seems that withokta isn't stripping the profile name from the arg list when it calls withokta using the following alias

function okta-aws {
    withokta "aws --profile $1" "$@"
}

All we get is a generic error from aws CLI complaining about bad arguments.

If the function is changed to

function okta-aws {
     withokta "aws --profile" "$@"
}

it seems to work fine, although I'm not sure that's the correct solution.

To Reproduce Steps to reproduce the behavior:

  1. Run okta-aws test sts get-caller-identity
  2. See error

Expected behavior Get logged into the profile and get your caller identity.

dangeReis avatar Aug 03 '21 16:08 dangeReis