# Architecture

Architectures supported by AWS Lambda.

- Source: [`aws-lambda/lib/architecture.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-lambda/lib/architecture.ts#L4)
- Type last changed: v2.88.0 · 20 Jul 2023

## 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

- `ARM_64`: [Architecture](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Architecture.html) (static) — 64 bit architecture with the ARM instruction set.

- `dockerPlatform`: string — The platform to use for this architecture when building with Docker.

- `name`: string — The name of the architecture as recognized by the AWS Lambda service APIs.

- `X86_64`: [Architecture](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Architecture.html) (static) — 64 bit architecture with x86 instruction set.

## Methods

- `custom(name: string, dockerPlatform?: string): Architecture // chainable` (static) — Used to specify a custom architecture name.

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

  **Parameters**

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

- `toString(): string` — Returns a string representation of the architecture using the name.
