deepud26
New Contributor II

Hello @ilir_nuredini ,

I'm trying the below way 

import requests
import json
 

headers = {
    "Authorization": f"Bearer {token}",
    "Content-Type": "application/json"
}

response = requests.get(API_URL, headers=headers)

if response.status_code == 200:
    data = response.json()
    print("data:", data)
else:
    print("Failed to get data:", response.status_code, response.text)

below error im getting :
 
ConnectionError: HTTPSConnectionPool(host='api-dev.amazon.com', port=443): Max retries exceeded with url: /v1/quality (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa108596d90>: Failed to establish a new connection: [Errno -2] Name or service not known'))

!nslookup api-dev.amazon.com
** server can't find api-dev.amazon.com: NXDOMAIN

This is a serverless setup that we are trying to create connectivity