简体   繁体   中英

Python 3rd Party Modules in AWS Lambda through Cloud9

I had a quick question. I recently started to learn python and have been using Cloud9 as my environment. I've created a code for Alexa in python that uses BeautifulSoup, meaning that AWS Lambda throws an error every time I run it (as it does not recognize BeautifulSoup as a model). I was wondering, since I'm working in Cloud9, how do I allow/permit AWS Lambda to work with BeautifulSoup?

To actually install the BS library, you'll need to use Pip . That will get it working in Cloud9. When you use the function in Lambda, it will require a deployment package that also includes the BS library.

The error you are getting probably relates to the library not existing in the Lambda environment.

If Cloud9 doesn't make it easy to export a deployment package, you might have to upload code manually .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM