I\'ve got a Python script for an AWS Lambda function that does HTTP POST requests to another endpoint. Since Python\'s urllib2.request
, https://docs.python.org/2/li
I succeeded sending HTTP POST requests using the urllib3
library, which is available at AWS Lambda without the requirements for additional installation instructions.
import urllib3
http = urllib3.PoolManager()
response = http.request('POST',
url,
body = json.dumps(some_data_structure),
headers = {'Content-Type': 'application/json'},
retries = False)