Reputation: 21
I have more than 3 secrets stored in aws secret manager and would like to retrieve 2 secrets at a time for my application. A call to getSecretValue() can return the result for only 1 secret at a time. Would you please suggest how one can retrieve multiple secrets from aws secret manager with a single function call?
Upvotes: 2
Views: 5584
Reputation: 1623
UPDATE: Secrets Manager now supports BatchGetSecretValue
It is not currently possible to do batch calls with Secrets Manager. However, if you store your secrets in JSON format, you could store multiple key/value pairs in one secret.
I would not recommend doing this, however, unless these secrets are strongly related. For example, a set of secrets needed by a single application. Even then, you should avoid this if possible. Combining secrets causes problems if you try to automate rotation, and becomes a problem when you need to split up an application and the permissions/secrets that go along with them.
Upvotes: 5