Skip to content

Provide constant for layer versions #423

@doblinger-extron

Description

@doblinger-extron

Expected Behavior

I would like to be able to set the nodeLayerVersion to a constant value provided by this library so that I don't have to update this version on a constant basis. The Datadog serverless plugin seems to handle this with a map file:

https://github.com/DataDog/serverless-plugin-datadog/blob/main/src/layers.json

Example

const datadogLambda = new DatadogLambda(this, 'DatadogLambda', {
      flushMetricsToLogs: true,
      addLayers: true,
      nodeLayerVersion: NodeLayerVersion.UsEast1.Node22.Latest, // Ideally a constant for the latest layer version is available. Perhaps the region must also be taken into account
    });

Actual Behavior

const datadogLambda = new DatadogLambda(this, 'DatadogLambda', {
      flushMetricsToLogs: true,
      addLayers: true,
      nodeLayerVersion: 124 // the version is hardcoded and must be looked up from https://github.com/DataDog/datadog-lambda-js/releases
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions