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

前端 未结 2 541
南方客
南方客 2021-01-01 01:07

I want to send a post request to an external API (https://example.com/api/jobs/test) every hour.

The Lambda Function that I used is as follows:

Handl         


        
2条回答
  •  無奈伤痛
    2021-01-01 01:42

    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

提交回复
热议问题