ImportError: cannot import name 'is_s3express_bucket' from 'botocore.utils' python 3.9
JordanBettridge opened this issue · comments
Describe the bug
This is a similar issue to the one found here: #3082
When deploying our lambda with python 3.9 it errors since the updates that have happened in the last few days.
ImportError: cannot import name 'is_s3express_bucket' from 'botocore.utils' (/home/ubuntu/actions-runner-xyz/xyz/_tool/Python/3.9.16/x64/lib/python3.9/site-packages/botocore/utils.py)
Expected Behavior
For the error to not occur on lambda deployment.
Current Behavior
Error appears, didnt appear last week so its due to updates in the last few days.
Reproduction Steps
Create a lambda with requirements txt. It does not have to have any functions
Possible Solution
No response
Additional Information/Context
No response
SDK version used
AWS Python 3.9 runtime
Environment details (OS name and version, etc.)
AWS Python 3.9 runtime
Hi @JordanBettridge, thanks for reaching out. It looks like you've updated s3transfer
in your package without updating boto3/botocore. This is the same issue seen in #3082 as you noted, you can see in this comment that inclusion of all the packages in Lambda won't yield this error.
The solution is the same documented here. If you're planning to rely on the boto3 copy supplied by Lambda, you'll need to ensure s3transfer
isn't added/updated with your dependencies in the function. Please let us know if you have any other questions.
s3 express is being redirected for the main module of the circuit in it.
The solution is the same documented #3082 (comment). If you're planning to rely on the boto3 copy supplied by Lambda, you'll need to ensure s3transfer isn't added/updated with your dependencies in the function. Please let us know if you have any other questions.