Suppose I wanted to store something like:
{
"service_name": {
"prod": "SECRET1",
"dev": "SECRET2"
}
}
Can I store such JSON in AWS Secrets Manager?
Suppose I wanted to store something like:
{
"service_name": {
"prod": "SECRET1",
"dev": "SECRET2"
}
}
Can I store such JSON in AWS Secrets Manager?
2
Answers
Yes – regardless of the JSON structure, to AWS, you will be storing a string (
SecretString
), or binary.Creating the secret:
Retrieving the secret:
Output:
Just to add on to Ermiya’s answer, if you have that json in a file (or variable) you can easily serialize/deserialize it using
jq
. Given:then creating the secret:
retrieving the secret: