9

I was trying to use AWS secrets manager service for storing secret keys. I could store the key in the secrets manager, but while retrieving the key using the code they provide I'm getting this error.

UnknownServiceError: Unknown service: 'secretsmanager'. Valid service names are: acm, alexaforbusiness,...

I tried a search on the AWS CLI and the service is not on the list also.

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

acm                                      | alexaforbusiness                        
apigateway                               | application-autoscaling                 
appstream                                | appsync     
.
.
.

Do I need some kind of aws cli update? May be because of the CLI version that I'm using. Then, how can I update that. I tried

sudo apt-get install -y awscli

an it says

awscli is already the newest version (1.11.13-1ubuntu1~16.04.0).
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Neron Joseph
  • 1,675
  • 22
  • 39

1 Answers1

15

secretsmanager is only available from aws cli version 1.15.8 and upwards

aws --version

aws-cli/1.15.10 Python/2.7.10 Darwin/17.5.0 botocore/1.10.10

You may need to manually install/update aws cli

Community
  • 1
  • 1
ThomasVdBerge
  • 7,483
  • 4
  • 44
  • 62
  • 1
    Indeed, I would recommend against the Ubuntu `aws` cli in the apt repository and use `pip` to install and upgrade. Use the [Linux Install](https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-linux.html) instructions to get your PATH set correctly. – stdunbar Apr 27 '18 at 16:18
  • 2
    If using boto3 and receving the same error, uprade to the latest version by pip install boto3 --upgrade – Adarsh May 10 '18 at 10:57
  • Does the AWS sdk present you w a message like "new version of the sdk is available? Like Microsoft does excessively? – committedandroider Jul 27 '19 at 00:32