Package Exports
- @cloudcomponents/lambda-utils
- @cloudcomponents/lambda-utils/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@cloudcomponents/lambda-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@cloudcomponents/lambda-utils
Lambda utils for cloudcomponents cdk constructs
Install
npm i @cloudcomponents/lambda-utilsHow to use
SecretKey
import { SecretKey } from "@cloudcomponents/lambda-utils";
const secretKey = new SecretKey(process.env.SECRET_KEY_STRING as string);
export const handler = async (event, context) => {
const value = await secretKey.getValue();
return `Hello ${value}`
}
See cdk-secret-key for the cdk counterpart
SecretKeyStore
import { SecretKeyStore } from "@cloudcomponents/lambda-utils";
const secretKeyStore = new SecretKeyStore(process.env.SECRET_KEY_STORE_STRING as string);
export const handler = async (event, context) => {
const value = "secret"
await secretKey.putValue(value);
return `Hello`
}
See cdk-secret-key for the cdk counterpart
