using Python 3 with AWS lambda

前端 未结 5 583
[愿得一人]
[愿得一人] 2021-02-05 04:09

Can one use application built with Python3 in lambda, and not just python2.7. Possibly looking at options around - https://gun.io/blog/announcing-zappa-serverless-python-aws-lam

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-05 04:31

    Lambda functions run in a container on a well-known AMI. While you must handle the initial event with Python2.7, you can call out to anything installed on the AMI. In particular, Python3 is already installed. It's a bit complicated, but you can establish a virtualenv to take advantage of the installed python3.

    For a few of the details, see http://www.cloudtrek.com.au/blog/running-python-3-on-aws-lambda/.

    Edit: that link went dead. Try https://www.linkedin.com/pulse/running-python-3-aws-lambda-lyndon-swan.

提交回复
热议问题