Skip to content

Commit

Permalink
Use the Lambda arch from the deployment machine
Browse files Browse the repository at this point in the history
There seems to be some kind of bug that the 'platform' parameter to the
code bundling is ignored. When specifying ARM64 as the architecture for
my lamda, and platform, the lambda bundling (docker buildx) just uses
the host architecture.
  • Loading branch information
raykrueger committed Oct 7, 2024
1 parent 4c45d95 commit 6640228
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { Architecture, Runtime } from 'aws-cdk-lib/aws-lambda';

export class Constants {
static readonly LAMBDA_RUNTIME = Runtime.PYTHON_3_12;
static readonly LAMBDA_ARCH = Architecture.ARM_64;
static readonly LAMBDA_ARCH = process.arch === 'arm64' ? Architecture.ARM_64 : Architecture.X86_64;
}

0 comments on commit 6640228

Please sign in to comment.