Architecture

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

Bases: object

Architectures supported by AWS Lambda.

Example:

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

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.

Return type

str

name

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

Return type

str

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