Skip to content

❗️NOTICE (lambda): SnapStart for Java functions using ARM64 #30899

@Leo10Gama

Description

@Leo10Gama

Describe the feature

The new feature is currently being worked on in this PR. In the meantime, you can access the SnapStart feature using the following workaround:

    const fn = new lambda.Function(this, 'Func', {
      runtime: lambda.Runtime.JAVA_21,
      handler: 'example.Handler',
      architecture: lambda.Architecture.ARM_64,
      code: lambda.Code.fromAsset(path.join(__dirname, '../../lambda/example.jar')),
      memorySize: 256,
    });

    // Workaround: Add SnapStart configuration like this:
    (fn.node.defaultChild as lambda.CfnFunction).addPropertyOverride('SnapStart', {
      ApplyOn: 'PublishedVersions',
    });

CDK version used

2.149.0

Environment details (OS name and version, etc.)

All

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-lambdaRelated to AWS Lambdaeffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions