Expected Behaviour
The latest release suggests adding this line to your build scripts.
# Remove documentation and examples
find build/ -name "docs" -type d -exec rm -rf {} +
If you include your own version of boto3 in your build, which I believe is recommend over relying on an unpinned version provided by lambda. You get the following error on importing boto3
{
"timestamp": "2025-09-10T05:23:20Z",
"log_level": "ERROR",
"errorMessage": "Unable to import module 'lambda_web_function': No module named 'botocore.docs'",
"errorType": "Runtime.ImportModuleError",
"requestId": "",
"stackTrace": []
}
I am not importing this, I am only importing
import boto3
from botocore.exceptions import ClientError
Current Behaviour
No error.
Code snippet
# Remove documentation and examples
find build/ -name "docs" -type d -exec rm -rf {} +
Possible Solution
Don't remove docs
Steps to Reproduce
See above
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.13
Packaging format used
Lambda Layers
Debugging logs
Expected Behaviour
The latest release suggests adding this line to your build scripts.
If you include your own version of boto3 in your build, which I believe is recommend over relying on an unpinned version provided by lambda. You get the following error on importing boto3
I am not importing this, I am only importing
Current Behaviour
No error.
Code snippet
Possible Solution
Don't remove docs
Steps to Reproduce
See above
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.13
Packaging format used
Lambda Layers
Debugging logs