aws / aws/aws-cdk

aws-lambda-: Way to exclude files in PythonFunction

Open
#23,313 1 comment 1 reaction 1 assignee Claimed by @kaizencc View on GitHub
@aws-cdk/aws-lambda effort/small feature-request p2
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.