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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lti-tool/dynamodb

v1.0.0

Published

DynamoDB storage for LTI 1.3 @lti-tool

Readme

@lti-tool/dynamodb

Installation

npm install @lti-tool/dynamodb

Quick Start

import { LTITool } from '@lti-tool/core';
import { DynamoDbStorage } from '@lti-tool/dynamodb';

const storage = new DynamoDbStorage({
  controlPlaneTable: 'lti-tool-control',
  dataPlaneTable: 'lti-tool-data',
  launchConfigTable: 'lti-tool-launch-config',
  logger: pino('dynamodb-storage'), // optional pino logger
});

const ltiTool = new LTITool({
  stateSecret: new TextEncoder().encode('your-secret'),
  keyPair: await generateKeyPair(), // generate secure keypair
  storage,
});

Features

  • Production Ready - Handles high-scale LTI deployments
  • Built-in Caching - LRU cache for frequently accessed data
  • Three-Table Design - Optimized access patterns
  • Auto-cleanup - Expired nonces and sessions removed automatically
  • AWS Optimized - Works seamlessly with Lambda and IAM roles

Configuration

Basic Setup

const storage = new DynamoDbStorage({
  controlPlaneTable: 'lti-tool-control', // LMS configurations
  dataPlaneTable: 'lti-tool-data', // nonce and session storage, with ttl
  launchConfigTable: 'lti-tool-launch-config', // LMS client and deployment lookup for optimized critical launch path performance
});

Table Schema

Three-table design optimized for different access patterns:

Control Plane Table (lti-tool-control)

Stores LMS client and deployment configurations.

| Attribute | Type | Description | | --------- | ------ | ------------------------------ | | pk | String | C#<clientId> | | sk | String | # (client) or D#<deployId> | | gsi1pk | String | Type#Client (for listing) | | gsi1sk | String | #<clientId> |

Data Plane Table (lti-tool-data)

Stores sessions and nonces with automatic TTL cleanup.

| Attribute | Type | Description | | --------- | ------ | ------------------------------ | | pk | String | S#<sessionId> or N#<nonce> | | sk | String | Same as pk | | ttl | Number | TTL for auto cleanup |

Launch Config Table (lti-tool-launch-config)

Optimized for fast LTI launch lookups.

| Attribute | Type | Description | | --------- | ------ | ------------------ | | pk | String | <iss>#<clientId> | | sk | String | <deploymentId> |

IAM Permissions

Required DynamoDB permissions for all three tables:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "dynamodb:GetItem",
        "dynamodb:PutItem",
        "dynamodb:UpdateItem",
        "dynamodb:DeleteItem",
        "dynamodb:Query"
      ],
      "Resource": [
        "arn:aws:dynamodb:*:*:table/lti-tool-control",
        "arn:aws:dynamodb:*:*:table/lti-tool-control/index/*",
        "arn:aws:dynamodb:*:*:table/lti-tool-data",
        "arn:aws:dynamodb:*:*:table/lti-tool-launch-config"
      ]
    }
  ]
}

Performance

  • Cached reads: ~1ms average
  • Cache misses: ~5ms average
  • Writes: ~3ms average

Deployment

Terraform Example

# Control plane table
resource "aws_dynamodb_table" "lti_control" {
  name           = "lti-tool-control"
  billing_mode   = "PAY_PER_REQUEST"
  hash_key       = "pk"
  range_key      = "sk"

  attribute {
    name = "pk"
    type = "S"
  }

  attribute {
    name = "sk"
    type = "S"
  }

  attribute {
    name = "gsi1pk"
    type = "S"
  }

  attribute {
    name = "gsi1sk"
    type = "S"
  }

  global_secondary_index {
    name     = "GSI1"
    hash_key = "gsi1pk"
    range_key = "gsi1sk"
  }
}

# Data plane table with TTL
resource "aws_dynamodb_table" "lti_data" {
  name           = "lti-tool-data"
  billing_mode   = "PAY_PER_REQUEST"
  hash_key       = "pk"
  range_key      = "sk"

  attribute {
    name = "pk"
    type = "S"
  }

  attribute {
    name = "sk"
    type = "S"
  }

  ttl {
    attribute_name = "ttl"
    enabled        = true
  }
}

# Launch config table
resource "aws_dynamodb_table" "lti_launch_config" {
  name           = "lti-tool-launch-config"
  billing_mode   = "PAY_PER_REQUEST"
  hash_key       = "pk"
  range_key      = "sk"

  attribute {
    name = "pk"
    type = "S"
  }

  attribute {
    name = "sk"
    type = "S"
  }
}