Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS QuickSight Embedding CLI error - aws: error: argument command: Invalid choice, valid choices are:

I am trying to embed a QuickSight Dashboard and am following the current steps.

https://aws.amazon.com/blogs/big-data/embed-interactive-dashboards-in-your-application-with-amazon-quicksight/

I'm at step 3 and able to assume the role and,

export AWS_ACCESS_KEY_ID="access_key_from_assume_role"
export AWS_SECRET_ACCESS_KEY="secret_key_from_assume_role "
export AWS_SESSION_TOKEN="session_token_from_assume_role"

However when I try and do the next step of calling "aws quicksight ..." from the next part I'm getting the following error,

aws: error: argument command: Invalid choice, valid choices are:

I've installed pip and made sure the command line text matches with correct details.

Has anyone experienced this or has any ideas why aws quicksight command wouldn't be working in the CLI?

like image 225
MillerC Avatar asked Mar 24 '26 15:03

MillerC


1 Answers

Check AWS CLI version:

aws --version

It looks like the AWS CLI needs update. To upgrade an existing AWS CLI installation, use the --upgrade option:

pip install --upgrade awscli

If you have pip3 then.

pip3 install --upgrade awscli

or

sudo pip3 install --upgrade awscli

Also remember that aws sts assume-role --role-arn has expiry token, to need to run this command again to get AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN to continue. What I did was I, I prepared a tempprofile for these credentials and used this profile in next aws quicksight commands. e.g

aws configure set AWS_ACCESS_KEY_ID XXXXXXX --profile tempprofile
aws configure set AWS_SECRET_ACCESS_KEY XXXXXXXX--profile tempprofile
aws configure set AWS_SESSION_TOKEN XXXXXXX --profile tempprofile

In my case also I set

aws configure set REGION ap-southeast-2 --profile tempprofile

and then in next aws quicksight commands use --profile tempprofile

like image 133
I Bajwa PHD Avatar answered Mar 27 '26 05:03

I Bajwa PHD



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!