You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
aws-lambda-powertools naturally depends on boto3 (and thus botocore) and dependency is defined in pyproject.toml. However this explicit dependency means that when building lambda layer package out of my own project I'll end up having boto3 and botocore in layer zip package. If I have only aws-lambda-powertools as a dependency then lambda layer zip will end up roughly 11.9MB. If I remove boto3 and botocore before zipping I'll end up to 2.8MB. As Lambda has 50MB layer zip limit then 11.9MB is too much from one dependency. Considering also the fact that you'll anyway already have boto3 preinstalled when using Python runtimes it's unnessessary to include in layer zip.
Of course I can workaround this by removing boto3 and botocore before zipping the layer package. Or I could try to separate dependencies to multiple layers but this will complicate deployments.
What were you trying to accomplish?
Expected Behavior
Current Behavior
Possible Solution
Move boto3 to as a dev-dependency and instruct developers using custom build docker runtime to include boto3 and a dependency.
Hi @villekr - thank you for opening an issue with us, this is being explored in the roadmap and it has more details on why it's not that simple (e.g., X-Ray SDK depends on it, and SDKs are updated every quarter, 6 months or on a yearly basis): aws-powertools/powertools-lambda#61
We're close to a solution, and v2 will be a modularized Powertools with AWS SDK being an optional dependency.
aws-lambda-powertools naturally depends on boto3 (and thus botocore) and dependency is defined in pyproject.toml. However this explicit dependency means that when building lambda layer package out of my own project I'll end up having boto3 and botocore in layer zip package. If I have only aws-lambda-powertools as a dependency then lambda layer zip will end up roughly 11.9MB. If I remove boto3 and botocore before zipping I'll end up to 2.8MB. As Lambda has 50MB layer zip limit then 11.9MB is too much from one dependency. Considering also the fact that you'll anyway already have boto3 preinstalled when using Python runtimes it's unnessessary to include in layer zip.
Of course I can workaround this by removing boto3 and botocore before zipping the layer package. Or I could try to separate dependencies to multiple layers but this will complicate deployments.
What were you trying to accomplish?
Expected Behavior
Current Behavior
Possible Solution
Move boto3 to as a dev-dependency and instruct developers using custom build docker runtime to include boto3 and a dependency.
Steps to Reproduce (for bugs)
Environment
# paste logs here
The text was updated successfully, but these errors were encountered: