Skip to content

Getting errors after trying to deploy Node.js lambdas with arm architecture #110

@vvo

Description

@vvo

Expected Behavior

Selecting the arm architecture for a lambda should not fail the runtime.

Actual Behavior

When trying to deploy to arm architecture, I got errors about the Datadog agent no able to start well.

Steps to Reproduce the Problem

  1. Add architecture: cdk.aws_lambda.Architecture.ARM_64, to an cdk.aws_lambda_nodejs.NodejsFunction
  2. cdk deploy
  3. runtime fails with:
RequestId: b6d7748b-1ec0-42dc-8cf6-513e295003d7 Error: fork/exec /opt/extensions/datadog-agent: exec format error
Extension.LaunchError
EXTENSION	Name: datadog-agent	State: LaunchError	Events: []	Error Type: UnknownError

Deployed arns:

  • arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Node14-x:76
  • arn:aws:lambda:us-east-2:464622532012:layer:Datadog-Extension-ARM:21

npm list (ran on my machine):

> npm list
├─┬ [redacted-cdk-project-name]@0.0.0 -> ./services/[redacted-cdk-project-name]
│ ├── @aws-sdk/client-cloudwatch@3.100.0
│ ├── @aws-sdk/client-kinesis@3.100.0
│ ├── @aws-sdk/client-lambda@3.100.0
│ ├── @aws-sdk/client-s3@3.100.0
│ ├── @swc/core@1.2.182
│ ├── @swc/helpers@0.3.13
│ ├── @swc/jest@0.2.21
│ ├── @types/aws-lambda@8.10.97
│ ├── aws-cdk-lib@2.21.1
│ ├── aws-cdk@2.21.1
│ ├── constructs@10.0.126
│ ├── datadog-cdk-constructs-v2@0.2.0
│ ├── datadog-lambda-js@5.76.0
│ ├── dd-trace@2.5.0
│ ├── esbuild@0.14.36
│ ├── get-stream@6.0.1
│ ├── jest@28.1.0
│ ├── reflect-metadata@0.1.13
│ └── source-map-support@0.5.21
└── yaml@1.10.2 extraneous

Guess: Because I list dd-trace in my own package.json, because cdk deploy happened on an x86_64 (GitHub action), then the agent that was loaded was not arm compatible?

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions