I’m trying to trigger several lambdas in parallel from another lambda. I’m using aiobotocore and this works fine locally but when I try to run it on AWSLambda, I have an error on the import modules:
Unable to import module 'lambda_function': cannot import name 'apply_request_checksum' from 'botocore.client' (/var/runtime/botocore/client.py)
I have tried to use aioboto3, but as it’s a wrapper the same thing happens, I’ve checked the versions of the packages, they match. I’ve tried changing the python version, did not work.
Googling this specific error did not help either. If you need any precision, please let me know, any hint would be highly appreciated.
3
Answers
After investigating, it turns out that it was a package version error. The botocore package needed by aiobotocore had to be the exact same version. And since botocore is by default on AWS Lambda, I had to get an older version of Aiobotocore instead.
But thanks a lot for the answers !
Use stepfunctions!!!. It’s service for lamba orchestration simply put run multiple lambdas sequentially, or in parallel.
Like Stealthily pointed out, it’s likely a package version issue.
Each python Lambda Runtime has given versions of
boto3
andbotocore
.I used the version of
aiobotocore
that depends on versions as close as possible to the ones of the runtime.