Back to Explore

awslabs/aws-lambda-invoke-store

GitHub
1 updates · last 90 days1 watchersOpen source

Last release:

@aws/lambda-invoke-store provides a generic per-invocation context store for the AWS Lambda Node.js runtime, letting you store and retrieve custom data safely within a single invocation. It also protects and exposes Lambda execution metadata such as requestId and tracing fields (X-Ray traceId and W3C trace context) with TypeScript types, supporting async/await context preservation. The AWS Lambda Runtime Interface Client typically initializes it automatically, so function code can usually just call getInstanceAsync() and use set/get.

Project status

  • Actively maintained: Recent repository activity is evident (last upstream push on 2026-08-11, plus a library update on 2026-07-01), indicating ongoing work rather than dormancy.
  • Update cadence: Updates arrived on roughly a 2 to 4 month rhythm in 2026 (v0.2.3 on 2026-01-08, v0.2.4 on 2026-03-12, v0.3.0 on 2026-07-01), with additional activity shortly after v0.3.0 (2026-08-11).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v0.3.0

    v0.3.0 adds support for W3C Trace Context headers by introducing new protected context fields for traceparent, tracestate, and baggage. The library exposes new convenience getters to read these values within an invoke context, and updates the README and tests accordingly.

    Features
  • v0.2.4

    v0.2.4 adds an optional boolean parameter to InvokeStore.getInstanceAsync to force the library to use InvokeStoreMulti. The change updates the instance selection logic and includes a new unit test covering the no-env-var forced multi behavior. The release also bumps several transitive dependencies in yarn.lock.

    Features
  • v0.2.3

    v0.2.3 updates the way the library declares the global awslambda InvokeStore type. The code also changes how the awslambda global object is reset during cleanup, which may subtly affect TypeScript typing and runtime behavior for some consumers.

  • v0.2.2

    Release v0.2.2 is a patch intended to fix InvokeStoreSingle clearing its context too early when the provided function is async. The code change removes the try-finally that previously reset currentContext immediately after run returned.

  • v0.2.1

    v0.2.1 is a patch release that primarily adds TypeScript type declaration support to the published package. The code diff shows no runtime logic changes, only package metadata updates and dependency lockfile refreshes.

    Features
  • v0.2.0

    v0.2.0 introduces an instance-based InvokeStore access pattern via InvokeStore.getInstanceAsync(), and internally selects between a single-context and multi-context implementation for Lambda execution. The code also refactors context handling to use an abstract base class with separate InvokeStoreSingle and InvokeStoreMulti implementations, and adds extensive concurrency and isolation tests.

    BreakingFeatures
  • v0.1.1

    v0.1.1 switches the package build and published artifacts to produce separate ESM and CommonJS bundles, plus a dedicated TypeScript declaration build. The release notes only mention the ESM/CJS output change, but the diff also modifies how the package is resolved by consumers through package.json entrypoints and the exports map.

  • v0.1.0

    Release v0.1.0 adds support for propagating and retrieving a tenantId within the Lambda invoke-scoped context. The change introduces a new protected context key and a corresponding convenience accessor on InvokeStore, with unit tests and README updated accordingly.

    Features
  • v0.0.2

    This v0.0.2 release is a patch update focused on setting up release scripts. The release notes do not describe any user-facing features, fixes, or API changes.