aws-cdk-lib.aws_lambda.Architecture

class Architecture

LanguageType name
.NETAmazon.CDK.AWS.Lambda.Architecture
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslambda#Architecture
Javasoftware.amazon.awscdk.services.lambda.Architecture
Pythonaws_cdk.aws_lambda.Architecture
TypeScript (source)aws-cdk-lib » aws_lambda » Architecture

Architectures supported by AWS Lambda.

Example

new lambda.Function(this, 'MyFunction', {
  runtime: lambda.Runtime.NODEJS_18_X,
  handler: 'index.handler',
  architecture: lambda.Architecture.ARM_64,
  code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')),
  insightsVersion: lambda.LambdaInsightsVersion.VERSION_1_0_119_0,
});

Properties

NameTypeDescription
dockerPlatformstringThe platform to use for this architecture when building with Docker.
namestringThe name of the architecture as recognized by the AWS Lambda service APIs.
static ARM_64Architecture64 bit architecture with the ARM instruction set.
static X86_64Architecture64 bit architecture with x86 instruction set.

dockerPlatform

Type: string

The platform to use for this architecture when building with Docker.


name

Type: string

The name of the architecture as recognized by the AWS Lambda service APIs.


static ARM_64

Type: Architecture

64 bit architecture with the ARM instruction set.


static X86_64

Type: Architecture

64 bit architecture with x86 instruction set.

Methods

NameDescription
static custom(name, dockerPlatform?)Used to specify a custom architecture name.

static custom(name, dockerPlatform?)

public static custom(name: string, dockerPlatform?: string): Architecture

Parameters

  • name string — the architecture name as recognized by AWS Lambda.
  • dockerPlatform string — the platform to use for this architecture when building with Docker.

Returns

  • Architecture

Used to specify a custom architecture name.

Use this if the architecture name is not yet supported by the CDK.