Skip to content
v2.275.0

Architecture Class ​

Architectures supported by AWS Lambda.

Example ​

ts
new lambda.Function(this, 'MyFunction', {
  runtime: lambda.Runtime.NODEJS_LATEST,
  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 ​

64 bit architecture with the ARM instruction set.
dockerPlatformstringdocker_platformstrdockerPlatformStringDockerPlatformstringDockerPlatform*string#
The platform to use for this architecture when building with Docker.
namestringnamestrnameStringNamestringName*string#
The name of the architecture as recognized by the AWS Lambda service APIs.
64 bit architecture with x86 instruction set.

Methods ​

custom(name: string, dockerPlatform?: string): Architecture // chainable@staticmethod def custom(name: str, docker_platform: typing.Optional[str] = None) -> Architecturepublic static Architecture custom(String name, String dockerPlatform)public static Architecture Custom(string name, string? dockerPlatform = null)func Custom(Name *string, DockerPlatform *string) Architecturestatic#
Used to specify a custom architecture name.

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

2 parameters

Parameters

  • namenamenamenameName — the architecture name as recognized by AWS Lambda.
  • dockerPlatformdocker_platformdockerPlatformdockerPlatformDockerPlatform — the platform to use for this architecture when building with Docker.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#
Returns a string representation of the architecture using the name.