I am trying send a POST request from AWS python lambda function but getting following error while sending:
[ERROR] ConnectionError: HTTPConnectionPool(host= ********************s3-website.ap-south-1.amazonaws.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f69fdfbda90>: Failed to establish a new connection: [Errno 110] Connection timed out')) Traceback (most recent call last):
![Response]
I tried with the following code:
import json
import uuid
import datetime
import re
import base64
import requests
import httpx
import asyncio
def lambda_handler(event,context):
INVENTORY_CP_OPERATION_URL="************.s3-website.ap-south-
1.amazonaws.com/"
message={
"email":"*******@********.com",
"password":"123456"
}
result=requests.post(**************,json=message)
return "success".