@pocket-tools/lambda-secrets
v1.2.0
Published
Utilities for accessing lambda secrets from the lambda secret layer
Downloads
231
Readme
Lambda Secrets
This package is used to obtain a secret or parameter from the Lambda Layer cache when enabled.
Secrets Manaager Usage
import {fetchSecret} from '@pocket-tools/lambda-secrets';
const secret = fetchSecret('/Lambda/Super/Secret');
console.log(secret.superSecretValue);
This also assumes that the secret stored in Secrets Manager is a JSON based value, which it almost always is.
Parameter Store Usage
import {fetchParameter} from '@pocket-tools/lambda-secrets';
const parameter = fetchParameter('/Lambda/Super/SecretParameter');
console.log(parameter);