@cloudcomponents/lambda-utils
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

cloudcomponents Logo

@cloudcomponents/lambda-utils

Build Status

Lambda utils for cloudcomponents cdk constructs

Install

npm i @cloudcomponents/lambda-utils

How 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

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    55
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    55
  • 0.2.0
    6
  • 0.1.1
    3
  • 0.1.0
    2

Package Sidebar

Install

npm i @cloudcomponents/lambda-utils

Weekly Downloads

65

Version

2.0.0

License

MIT

Unpacked Size

32.1 kB

Total Files

15

Last publish

Collaborators

  • hupe1980