Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unknown service: 'secretsmanager' or AWS Secrets Manager service is not in the list of AWS CLI

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).
like image 997
Neron Joseph Avatar asked Apr 27 '18 13:04

Neron Joseph


People also ask

How do I access AWS Secret Manager?

You can retrieve your secrets by using the console (https://console.aws.amazon.com/secretsmanager/ ) or the AWS CLI ( get-secret-value ). In applications, you can retrieve your secrets by calling GetSecretValue in any of the AWS SDKs. However, we recommend that you cache your secret values by using client-side caching.

How do I list AWS secrets?

To list the versions of a secret, use ListSecretVersionIds . To get the secret value from SecretString or SecretBinary , call GetSecretValue . For information about finding secrets in the console, see Find secrets in Secrets Manager . Required permissions: secretsmanager:ListSecrets .

What AWS service is used to store secrets and has automated secret rotation?

AWS Secrets Manager helps you manage, retrieve, and rotate database credentials, API keys, and other secrets throughout their lifecycles.


1 Answers

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

like image 182
ThomasVdBerge Avatar answered Oct 13 '22 02:10

ThomasVdBerge