aws / aws/aws-lambda-base-images
Update boto3 and botocore in 3.10, 3.9, 3.8., and 3.7 to fix urllib3 2.x ImportError: cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_'
- Dominant language
- No language data
- Stars
- 777
- Forks
- 118
- PR merge metrics
- No merged PRs in 30d
Description
Today if I deploy a Lambda function packaging urllib3 2.x and also import boto3, my function fails with this error:
```
[ERROR] Runtime.ImportModuleError: Unable to import module 'handler': cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' (/var/task/urllib3/util/ssl_.py) Traceback (most recent call last):
```
The same code does not fail when using the Python 3.11 runtime.
Presumably this is the result of [this issue](https://github.com/boto/boto3/issues/3714#issuecomment-1551798191) which @nateprewitt points out was fixed in boto3 1.26.123 (which requires botocore >= 1.29.123).
I see that 3.7, 3.8, 3.9, and 3.10 runtimes are all using boto3-1.26.90 and botocore-1.29.90 [according to the docs](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html).
I'd like this issue to be resolved by updating the version of both boto3 and botocore provided by Lambda in these managed runtimes.
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.