aws-lambda-: Way to exclude files in PythonFunction
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
Way to exclude files from resulting output, so similar to `exclude` in `AssetOptions` 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
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.54.0
### Environment details (OS name and version, etc.)
not relevant
Contributor guide
Assessment
This issue has not been assessed yet.