aws_cdk.aws_lambda_python_alpha:: Install extra packages in BundlingOptions
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
Is it possible to add an option to pass extra packages to the [default Dockerfile](https://github.com/aws/aws-cdk/blob/v2.72.0/packages/%40aws-cdk/aws-lambda-python/lib/Dockerfile) used for bundling the lambda layer zip file?
### Use Case
I have several packages in my CodeArtifact private PyPI repo that use C++ extensions, so when pip tries to install them, it would throw an error saying that it requires `cmake` to be present inside the Docker container. I know I could just copy the default Dockerfile and add `yum install -y cmake`, but I'd like to know if there can be a better way.
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.70.0
### Environment details (OS name and version, etc.)
Windows 11 22H2
Contributor guide
Research direction
Start with packages/@aws-cdk/aws-lambda-python/lib/Dockerfile and the BundlingOptions API for the Python Lambda module. Trace how the default Dockerfile is selected during layer bundling and review existing bundling tests. Done means users have a supported way to provide extra packages such as cmake, with the behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, python
- Domain
- build-system, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100