Packaging for serverless: effortless? Doubtless!
summary
Claim: switching from pip install inside Docker to the Pants build system plus PEX cuts Python AWS Lambda packaging from painful to fast. Using the old script with Docker produces an echo lambda in ~5s and a matplotlib plot lambda in ~100s; native execution without Docker via Pants yields ~2s and <8s, respectively. Builds for the infra drop from 3 minutes to 90 seconds, and local tests go from ~5.5 minutes to ~10 seconds. The artifacts are ZIP packages for AWS Lambda and they work.
AI-written summary · about
chapters (11)
- 0:00Serverless packaging challenges
- 2:29AWS Lambda Python requirements
- 5:57Python build system for Lambda
- 9:26Build system pitfalls and Docker
- 13:14Dependency management issues
- 16:28Pants as a build tool
- 19:57Pants for Lambda packaging
- 22:02Pants dependency inference
- 23:25Pants performance: parallelism and caching
- 25:55Pants performance powers
- 26:58Real-world impact of Pants
related talks
46mServerless for Data Scientists
53mContainers and Serverless with AWS
37mSnakes and Ladders: The Ups and Downs of Python Development with AWS Lambda
19mHow to create a fast and cost effective serverless geospatial analysis pipeline...
54mServerless Python on AWS Lambda using the Serverless Framework
01h 02mUsing Python to Power Serverless Applications
01h 10mEffortless APIs with Flash and AWS Lambdas
01h 27mUnleash your PowerShell with AWS Lambda and Serverless Computing
