AWS Lambda Python Dependencies - Packaging with Zip and CDK

Опубликовано: 21 Март 2026
на канале: Peter's Tech Toolbox
84
5

This is part 5 in our series on AWS Lambda. We're tackling the challenge of using external Python libraries in our Lambda functions. So far, we've used standard libraries built in to Python but applications often need packages that aren't built-in. This video shows how to package your code along with its dependencies into a deployment package using a zip file all managed via AWS CDK in Python.

We'll start by seeing what happens when dependencies are missing and then fix them by creating a deployment package that includes our external libraries. By the end, we'll have a clear understanding of how Python packaging works in Lambda.

References:
AWS Lambda Deployment Packages with .zip files: https://docs.aws.amazon.com/lambda/la...
AWS CDK Lambda Function (Python): https://docs.aws.amazon.com/cdk/api/v...
Installing Python Packages with Pip: https://packaging.python.org/en/lates...
Lambda runtimes: https://docs.aws.amazon.com/lambda/la...
Amazon Linux Manylinux compatibility tags: https://docs.aws.amazon.com/powertool...