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).
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.
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 .
AWS Secrets Manager helps you manage, retrieve, and rotate database credentials, API keys, and other secrets throughout their lifecycles.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With