Lacking examples of managing/deploying Python dependencies
See original GitHub issue❓ Guidance Question
The Question
As mentioned in aws/aws-cdk#3660, we are lacking a good example of a more realistic Lambda which includes dependencies. How should a developer ensure that handlers are packaged with their required dependencies? The current examples/boilerplate code only seems to demonstrate managing deployment code (i.e. cdk
dependencies) but does not demonstrate best-practice for handling runtime dependencies.
Perhaps the correct solution is to utilize Lambda Layers to package dependencies? If so, it would be helpful to have that demonstrated in an example project.
Whatever the solution, it should demonstrate:
- separating runtime dependencies from build-time dependencies
Additionally, it would be nice if we could demonstrate:
- supporting the concept of packaging different handlers with only the dependencies that they need
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Best Practices for Python Dependency Management - Medium
Dependency management is like your city's sewage system. ... For example, just run pip install numpy to install numpy and its dependencies.
Read more >How to Best Manage Python Dependencies - ActiveState
There are several different approaches to dealing with Python dependencies - Pinenv, Virtualenv or an alternate custom solution.
Read more >A Comprehensive Guide To Python Dependency Management
Learn how to manage Python dependencies using pip. Know how to install, uninstall, and upgrade packages. Understand how to use the ...
Read more >Managing Application Dependencies
For alternatives, see Other Tools for Application Dependency Management. Installing Pipenv¶. Pipenv is a dependency manager for Python projects. If you're ...
Read more >How to Manage Python Dependencies in PySpark - Databricks
pyFiles configuration, but this functionality cannot cover many cases, such as installing wheel files or when the Python libraries are dependent ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Hashnode Post
No results found
@JamieMcKernanKaizen I ended up doing something like the following:
Making an
aws-samples/aws-cdk-examples
for python using bundling would be great.Mainly because the example code in section “Bundling asset code” in CDK Python docs (v 1.47.1) doesn’t work without some tweaking ( as published in https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_lambda.README.html#id3 )