Send Post request to an external API using AWS Lambda in python

↘锁芯ラ 提交于 2019-12-04 17:12:07

You need to install requests module to your project directory and create a lambda deployment package. See this link for details.

In short, you need to create your index.py file on you development system (PC or mac), install Python & pip on that system; them follow the steps in the doc. To create lambda, choose the 'Upload zip' option instead of the 'Edit inline' one

You may be able to leverage requests module from the boto library without having to install or package your function.

Consider this import: import botocore.vendored.requests as requests

Note: Vendored requests are being removed from botocore.

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