aws-lambda-: Way to exclude files in PythonFunction #23313
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
Way to exclude files from resulting output, so similar to
exclude
inAssetOptions
used in base Function.Currently PythonFunction uses hard coded exclude
["*.pyc"]
so just way to extend or override that.Use Case
Many of our functions have for example
.mypy_cache
dir that can be example 38M in size and there isn't any reason to include that in deployment. Also some of our dependencies include unnecessary stuff and easiest would be to just exclude those files.Proposed Solution
Currently PythonFunction uses hard coded exclude
["*.pyc"]
so just way to extend or override that.Other Information
No response
Acknowledgements
CDK version used
2.54.0
Environment details (OS name and version, etc.)
not relevant
The text was updated successfully, but these errors were encountered: