@pocket-tools/lambda-secrets
v1.4.0
Published
Utilities for accessing lambda secrets from the lambda secret layer
Downloads
352
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');
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');