Skip to content

AWS Lambda Layer

Creates a new public Lambda layer in each available AWS region and updates the Sentry release registry.

Configuration

OptionDescription
layerNameName of the Lambda layer. Supports template variables (see below)
compatibleRuntimesList of runtime configurations
licenseLayer license
linkPrereleasesUpdate for preview releases. Default: false
includeNamesMust filter to exactly one artifact

Layer Name Templating

The layerName option supports Mustache-style template variables for dynamic version interpolation:

VariableDescriptionExample (for v10.2.3)
{{{version}}}Full version string10.2.3
{{{major}}}Major version number10
{{{minor}}}Minor version number2
{{{patch}}}Patch version number3

This is useful when you want the layer name to reflect the SDK major version, making it easier for users to identify which version the layer supports.

Example: SentryNodeServerlessSDKv{{{major}}} becomes SentryNodeServerlessSDKv10 when publishing version 10.2.3.

Runtime Configuration

compatibleRuntimes:
- name: node
versions:
- nodejs10.x
- nodejs12.x

Environment Variables

NameDescription
AWS_ACCESS_KEYAWS account access key
AWS_SECRET_ACCESS_KEYAWS account secret key

Examples

Basic Example

targets:
- name: aws-lambda-layer
includeNames: /^sentry-node-serverless-\d+(\.\d+)*\.zip$/
layerName: SentryNodeServerlessSDK
compatibleRuntimes:
- name: node
versions:
- nodejs10.x
- nodejs12.x
license: MIT

With Version Templating

Include the major version in the layer name so users can easily identify SDK compatibility:

targets:
- name: aws-lambda-layer
includeNames: /^sentry-node-serverless-\d+(\.\d+)*\.zip$/
layerName: SentryNodeServerlessSDKv{{{major}}}
compatibleRuntimes:
- name: node
versions:
- nodejs18.x
- nodejs20.x
license: MIT

When publishing version 10.2.3, the layer will be named SentryNodeServerlessSDKv10.