Skip to content

aws-lambda-python-alpha: PythonFunction requires 4 minutes to build and produces a 3GB Docker image #32682

@garysassano

Description

@garysassano

Describe the bug

The Docker image for this Lambda function was built on an AMD Ryzen 5 7600X CPU.

The resulting image size of 3GB is highly excessive, especially considering that the final Lambda function deployment package is only 3.6MB.

image

image

image

Regression Issue

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

Last Known Working CDK Version

No response

Expected Behavior

See above.

Current Behavior

See above.

Reproduction Steps

See above.

Possible Solution

Refactor the Dockerfile.

Additional Information/Context

Related issue: #32413

CDK CLI Version

2.173.3

Framework Version

No response

Node.js Version

22.12.0

OS

Ubuntu 24.04.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