Architecture

class aws_cdk.aws_lambda.Architecture(*args: Any, **kwargs)

Bases: object

Architectures supported by AWS Lambda.

ExampleMetadata:

infused

Example:

lambda_.Function(self, "MyFunction",
    runtime=lambda_.Runtime.NODEJS_18_X,
    handler="index.handler",
    architecture=lambda_.Architecture.ARM_64,
    code=lambda_.Code.from_asset(path.join(__dirname, "lambda-handler")),
    insights_version=lambda_.LambdaInsightsVersion.VERSION_1_0_119_0
)

Methods

to_string()

Returns a string representation of the architecture using the name.

Return type:

str

Attributes

ARM_64 = <aws_cdk.aws_lambda.Architecture object>
X86_64 = <aws_cdk.aws_lambda.Architecture object>
docker_platform

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

name

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

Static Methods

classmethod custom(name, docker_platform=None)

Used to specify a custom architecture name.

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

Parameters:
  • name (str) – the architecture name as recognized by AWS Lambda.

  • docker_platform (Optional[str]) – the platform to use for this architecture when building with Docker.

Return type:

Architecture