Unable to import grequests for AWS Lambda

孤街浪徒 提交于 2019-12-01 04:04:18

I had to build gevent from src on an Amazon Linux instance. I put the resultant files in a zip if anyone needs them--just include them in your uploaded Lambda zip and you should be concurrent-ing like a boss.

https://github.com/brandonmp/aws-lambda-grequests

birnbaum

As Gevent is based on libev it is most likely compiling binaries when being installed via pip.

You need to make sure that you are deploying binaries that are compiled for Amazon Linux if you want them to be executable in AWS Lambda. You can do so by building your deploy package on an EC2 instance that is running Amazon Linux.

Also check out this answer and this tutorial.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!