Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Lambda runtime lookup for provided.al2023 (AWS recommended for Go functions) #282

Closed
benjamin-scc opened this issue Aug 22, 2024 · 0 comments

Comments

@benjamin-scc
Copy link
Contributor

Expected Behavior

Lambda layer to be added and output in CDK synthesized template under Layers for type AWS::Lambda::Function

Actual Behavior

Missing Lambda layer when Lambda runtime is provided.al2023

Steps to Reproduce the Problem

  1. Using the latest version: "datadog-cdk-constructs-v2": "1.14.1" (NOTE: Looks to have been an issue since version >= 1.7.4)
  2. With CDK code
const lambda = new lambda.Function(this, id, {
  runtime: aws_lambda.Runtime.PROVIDED_AL2023,
  architecture: aws_lambda.Architecture.ARM_64,
  ...
})

const datadog = new Datadog(this, 'Datadog', {
  ...
})

datadog.addLambdaFunctions([lambda])
  1. cdk synth
  2. Inspect synthesized output template file (cdk.out/*.template.json) to find the Lambda is missing layer

Specifications

Add "provided.al2023": RuntimeType.CUSTOM to runtimeLookup in constants.ts

image

See - https://github.com/DataDog/datadog-cdk-constructs/blob/main/src/constants.ts#L51-L72

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant