AWS Lambda doesn't recognized built-in python libraries

0

I use lambda functions for web scraping. The lambda function doesn't recognize basic libs like : requests,beautifulsoup, charset_normalizer and even idna. I can't code like that, I feel that I need to import the whole python interpreter in order to success to run the program please helpEnter image description here

질문됨 일 년 전367회 조회
1개 답변
2
수락된 답변

The Lambda Python runtime includes only the interpreter itself + the AWS SDK. If you need any library that you need to include in teh requirements.txt, you need to include it in the deployment package. The easiest way to do that is to use SAM. Use sam init to create the project, and later use sam build and sam deploy to deploy the application with all the dependencies.

profile pictureAWS
전문가
Uri
답변함 일 년 전
profile picture
전문가
검토됨 11일 전
profile picture
전문가
검토됨 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인