npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@inception-health/cdk-lambda

v0.0.2

Published

## Overview

Readme

@inception-health/cdk-lambda

Overview

The @inception-health/cdk-lambda package provides a custom AWS Lambda construct for the AWS Cloud Development Kit (CDK). This construct simplifies the creation and management of AWS Lambda functions with advanced logging, monitoring, and dead letter queue (DLQ) support which support HIPAA Compliance.

Features

  • Logging: The Lambda function logs to CloudWatch Logs in JSON structured format, making it easier to search, filter, and analyze large volumes of log entries.
  • Monitoring: Integration with CloudWatch Lambda Insights for advanced monitoring and troubleshooting.
  • Dead Letter Queue (DLQ): Automatic creation and management of a DLQ for handling failed messages.
  • Encryption: Support for encryption using AWS KMS.
  • Customizable: Various properties to customize the Lambda function, including environment variables, memory size, timeout, and more.

Installation

To use this construct in your CDK application, install the package via npm:

npm install @inception-health/cdk-lambda

Usage

Below is an example of how to use the Lambda construct in your CDK application:

import { Stack, StackProps } from "aws-cdk-lib";
import { Construct } from "constructs";
import { Lambda } from "@inception-health/cdk-lambda";

export class MyStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    new Lambda(this, "MyLambdaFunction", {
      name: "myLambdaFunction",
      file: "path/to/your/lambda/handler.ts",
      handler: "handler",
      environment: {
        MY_ENV_VAR: "value",
      },
      memorySize: 256,
      timeout: Duration.seconds(60),
      deadLetterQueue: true,
      encryption: new aws_kms.Key(this, "MyKey"),
    });
  }
}

API Reference

LambdaProps

The LambdaProps interface defines the properties that can be passed to the Lambda construct.

| Property | Type | Description | Default Value | | ------------------ | ------------------------------ | ----------------------------------------------------- | ------------- | | deadLetterQueue? | boolean | Activate a Dead Letter Queue for the Lambda function. | false | | description? | string | Description of the Lambda function. | | | encryption? | aws_kms.IKey | Encryption key to be used. | | | environment? | { [key: string]: string } | Environment variables for the Lambda function. | | | file | string | File containing the Lambda function. | | | handler? | string | Handler for the Lambda function. | "handler" | | logRetention? | aws_logs.RetentionDays | Log retention period in days. | 2 months | | loggingLevel? | "INFO" \| "DEBUG" \| "ERROR" | Logging level. | "INFO" | | memorySize? | number | Memory size of the Lambda function in MB. | 128 | | name | string | Name of the Lambda function. | | | storage? | Size | Ephemeral storage for the Lambda function. | 512 MB | | timeout? | Duration | Timeout of the Lambda function. | 30 seconds |

Lambda Methods

The Lambda class represents an AWS Lambda function in a CDK application. The Lambda construct offers additional custom methods:

  • addEnvironment(key: string, value: string): Adds an environment variable to the Lambda function.
  • grantInvoke(identity: aws_iam.IGrantable): aws_iam.Grant: Grants invoke permissions to the specified identity.