Skip to content

How to retrieve a Secret from AWS Secrets Manager in the CLI

If you have stored a secret in AWS using the Secrets Manager, it is possible to use the AWS CLI to retrieve this value at a later date.

aws secretsmanager get-secret-value --secret-id <ARN>

The arn is the Amazon Resource Name, which will look something like this:

aws secretsmanager get-secret-value --secret-id arn:aws:secretsmanager:<region>:<account>:<secretname>

Get a Secret from AWS Secrets Manager using the CLI

aws secretsmanager get-secret-value --secret-id arn:aws:secretsmanager:eu-west-1:4872719xxxxx:secret:NameOfOurSecret-xxx
Code language: CSS (css)

See also  How to Fix "is not authorized to create managed-rule" in AWS Step Functions
Tags:
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x