(aws_cdk.aws_lambda_python_alpha): Allow setting poetry and uv versions using Bundle Config for PythonFunction
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 71
Description
### Describe the feature
Create a new BundlingOptions parameter that accepts a string that allows setting the version of the packaging tool such as poetry or uv used in the bundling step for Lambda function. These are currently available in ARGS for the vendored dockerfile used for packaging, but not settable from Python code easily.
### Use Case
Packaging using Poetry 2+ where pyproject.toml options have changed etc.
### Proposed Solution
```python
BundlingOptions(
build_args={"POETRY_VERSION": "2.2.1"}
)
```
Should choose Poetry version.
### Other Information
BundlingOption parameter
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS CDK Library version (aws-cdk-lib)
2.220.0
### AWS CDK CLI version
2.1029.0
### Environment details (OS name and version, etc.)
Ubuntu 22.04, Python 3.11
Contributor guide
Research direction
Start with PythonFunction's BundlingOptions and the vendored Dockerfile used for packaging, then trace how its ARGS are exposed to Python code. Verify that a version value can select the Poetry or uv version during bundling, and confirm packaging with a requested Poetry version such as 2.2.1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cloud, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100