How do I add python libraries to an AWS lambda function for Alexa?

前端 未结 8 1711
野趣味
野趣味 2020-12-04 19:32

I was following the tutorial to create an Alexa app using Python:

Python Alexa Tutorial

I was able to successfully follow all the steps and get the app to w

8条回答
  •  温柔的废话
    2020-12-04 20:16

    The official documentation is pretty good. In a nutshell, you need to create a zip file of a directory containing both the code of your lambda function and all external libraries you use at the top level.

    You can simulate that by deactivating your virtualenv, copying all your required libraries into the working directory (which is always in sys.path if you invoke a script on the command line), and checking whether your script still works.

提交回复
热议问题