How to used trp.trp2 package use inside AWS lambda as layer ?

0

I am created trp.trp2 layer in AWS lambda but that layer is not working for my lambda code to import trp.trp2 as t2 How to used trp.trp2 package use inside AWS lambda as layer ? (For python code only)

amogh
demandé il y a 2 ans507 vues
1 réponse
0

Try using docker to create a Lambda Layer by following steps.
It works in my environment.

docker run --rm -v $(pwd):/var/task public.ecr.aws/sam/build-python3.9:latest pip install amazon-textract-response-parser -t python/lib/python3.9/site-packages/
zip -r amazon-textract-response-parser.zip ./python > /dev/null
aws lambda publish-layer-version --layer-name amazon-textract-response-parser --zip-file fileb://amazon-textract-response-parser.zip --compatible-runtimes python3.9
profile picture
hayao-k
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions