Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

aws: error: argument command: Invalid choice, valid choices are: this is the error showing with some number of commands

aws rekognition index-faces \
--image '{"S3Object":{"Bucket":"mybucketname","Name":"S3ObjectKey"}}' \
--collection-id "image1" \
--region us-east-1 \
--profile adminuser

That is my code which I'm running on terminal, I tried but don't know why is that error coming. What changes should I do??

like image 257
prithvi Raj Avatar asked Nov 22 '17 09:11

prithvi Raj


People also ask

Why AWS CLI not working?

If the aws command cannot be found after first installing or updating the AWS CLI, you might need to restart your terminal for it to recognize any PATH updates. If the aws command cannot be found after first installing or updating the AWS CLI, it might not have been fully installed.

How do you check if AWS CLI is configured correctly?

Use the describe-configuration-recorder-status command to check that the AWS Config has started recording the configurations of the supported AWS resources existing in your account. The recorded configurations are delivered to the specified delivery channel.

Can't connect to Endpoint URL AWS CLI?

You can get the "Could not connect to the endpoint URL" error if there's a typo or error in the specified Region or endpoint. Before you run the cp or sync command, be sure to confirm that the associated Region and S3 endpoint are written correctly.

How do I change to AWS command line?

To switch to a production role (AWS CLI)Create a new profile for the role in the . aws/config file in Unix or Linux, or the C:\Users\USERNAME\. aws\config file in Windows. The following example creates a profile called prodaccess that switches to the role ProductionAccessRole in the 123456789012 account.


1 Answers

I ran into the same issue on a Mac. Looks like after successful:

pip install --user --upgrade awscli

"aws --version" was still pointing to the old version.

Running the following helped:

sudo -H pip install awscli --upgrade --ignore-installed six
like image 81
Emilia Apostolova Avatar answered Sep 18 '22 11:09

Emilia Apostolova