William Ross
William Ross

Reputation: 3910

Unable to import python requests library into AWS Lambda function

I have a lambda function that where I cannot the requests library to import.

So far I have tried the following imports:

import requests
from botocore.vendored import requests

Neither of these has worked. Other libraries are importing fine such as import json.

What do I need to do to get the requests library to import to AWS Lambda

Upvotes: 1

Views: 2081

Answers (1)

krishna_mee2004
krishna_mee2004

Reputation: 7366

requests library doesn't come by default in lambda. Comment out the first line and just go with the second line:

from botocore.vendored import requests

Upvotes: 3

Related Questions