aws-lambda-python-alpha: dependencies are skipped when using a custom bundler #30540
Labels
@aws-cdk/aws-lambda-python
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
p3
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
I'm trying to use a custom docker image based on the SAM sam/build-python3 image to install a specific set of dependencies in my python-based lambda function. The default bundling functionality is far to coarse, so I need to use my own image.
My image ends with:
so, all dependencies are packaged in the folder
/var/dependencies
when the image build completes, which is also the current WORKDIR of the image.However, there's no way for me to understand or control how bundling actually happens based on this image - which folders are picked up and used for constructing the uploaded zip file etc.
My cdk app snippet looks like this:
The resulting function consists only of the source code files present in
log_shipper_function_folder
, not any dependencies in the build image.My question is: How can I control/understand what folders are being picked up when building the zip?
Expected Behavior
a zip is built containing the source code files along with the dependencies in the image
Current Behavior
dependencies are skipped
Reproduction Steps
see above
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.127.0 (build 6c90efc)
Framework Version
No response
Node.js Version
20
OS
ubuntu 24
Language
Python
Language Version
Python 3.12
Other information
No response
The text was updated successfully, but these errors were encountered: