Skip to content

aws-s3-deployment: BucketDeployment creates Lambda function with unsupported runtime #34372

Open
@jesse-small

Description

@jesse-small

Describe the bug

When using the BucketDeployment a lambda will be created using an old runtime version of python. This causes the AwsSolutions-L1 to complain stating that a non-container Lambda function is not configured to use the latest runtime version.

This seems to be a repeat of this issue: #21470

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

No response

Expected Behavior

The BucketDeployment should either let me control which runtime it uses, or default to the latest.

Current Behavior

BucketDeployment is using an old runtime and this causes CDK deployments to fail.

Reproduction Steps

aws-cdk: 2.1013.0
aws-cdk-lib: 2.194.0

Attempt to create a BucketDeployment and an error will be thrown stating:

"AwsSolutions-L1: The non-container Lambda function is not configured to use the latest runtime version. Use the latest available runtime for the targeted language to avoid technical debt. Runtimes specific to a language or framework version are deprecated when the version reaches end of life. This rule only applies to non-container Lambda functions."

Possible Solution

Let me control the runtime, or update the runtime to use the latest that the CDK cli is expecting.

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.194.0

AWS CDK CLI version

2.1013.0

Node.js Version

22

OS

macOS Sequoia 15.4.1

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions