- 최신
- 최다 투표
- 가장 많은 댓글
Ensure that your lambda function is using the latest version of boto3 by packaging it with your code. For example v1.21.1 of boto3 does not contain QueriesConfig
argument https://boto3.amazonaws.com/v1/documentation/api/1.21.1/reference/services/textract.html#Textract.Client.analyze_document
Follow the instructions here to use the most recent version of boto3 by adding a Layer:
https://docs.aws.amazon.com/textract/latest/dg/lambda.html
Another good reference is here: https://aws.amazon.com/premiumsupport/knowledge-center/lambda-python-runtime-errors/
In my case, the boto3 version is updated to 1.24.96.
Tip: Use print(boto3.version) and print(botocore.version) in your function code to confirm the version of Boto 3 and Botocore.
I was facing same issue and I am able to solve it by creating a lambda layer for latest boto3 library and adding it to my function. Followed the steps mention in this blog post https://aws.amazon.com/premiumsupport/knowledge-center/lambda-python-runtime-errors/
1. Create a lib folder by running the following command: LIB_DIR=boto3-mylayer/python mkdir -p $LIB_DIR 2. Install the library to LIB_DIR by running the following command: pip3 install boto3 -t $LIB_DIR 3. Zip all the dependencies to /tmp/boto3-mylayer.zip by running the following command: cd boto3-mylayer zip -r /tmp/boto3-mylayer.zip .
4. Publish the layer by running the following command:
aws lambda publish-layer-version --layer-name boto3-mylayer --zip-file fileb:///tmp/boto3-mylayer.zip --compatible-runtimes python3.6 python3.7 python3.8 --compatible-architectures "arm64" "x86_64"
Hi, I am using boto3 version 1.23.1. Issue is still there when I tried calling inside a dockerised lambda function. Boto3 version in requirements is 1.23.1, python image public.ecr.aws/lambda/python:3.8. However the issue got resolved when I call it from local environment.
I have the same issue with boto3 version 1.24.34, and lambda image py3.9, thus, this is not the issue. In my case Forms works, but Queries not. Could you help us to solve this issue?