sondehub-infra/lambda/ham_put_api/__main__.py
2022-05-18 08:41:52 +10:00

43 lines
1.8 KiB
Python

from . import *
payload = {
"version": "2.0",
"routeKey": "PUT /sondes/telemetry",
"rawPath": "/sondes/telemetry",
"rawQueryString": "",
"headers": {
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"content-encoding": "gzip",
"content-length": "2135",
"content-type": "application/json",
"host": "api.v2.sondehub.org",
"user-agent": "autorx-1.4.1-beta4",
"x-amzn-trace-id": "Root=1-6015f571-6aef2e73165042d53fcc317a",
"x-forwarded-for": "103.107.130.22",
"x-forwarded-port": "443",
"x-forwarded-proto": "https",
"date": "Sun, 31 Jan 2021 00:21:45 GMT",
},
"requestContext": {
"accountId": "143841941773",
"apiId": "r03szwwq41",
"domainName": "api.v2.sondehub.org",
"domainPrefix": "api",
"http": {
"method": "PUT",
"path": "/sondes/telemetry",
"protocol": "HTTP/1.1",
"sourceIp": "103.107.130.22",
"userAgent": "autorx-1.4.1-beta4",
},
"requestId": "Z_NJvh0RoAMEJaw=",
"routeKey": "PUT /sondes/telemetry",
"stage": "$default",
"time": "31/Jan/2021:00:10:25 +0000",
"timeEpoch": 1612051825409,
},
"body": "H4sIAI8ihGIAA42Sz0/CMBTH7/wVhDPUdt3cxlnxYLwoepCQ5cEesKRrZ9cNifF/t53rJHCxhyb7vs/78X3rajS256u7J7XamSNozCSUOJmPJxryQtVK5phBY1SmPyfTC7RFXRdKOpqRiEQeaCqhIEedbUGIuth3xNsjX7w+z5b3L8srDqRBKaErdBOOj9DiuFRSVUqgh01RYqZxi0WLuSMDGrAZC2acLimfR9Gc2hEYvU2Sd5+Tg0GX90+8BNnsYGsajdqlPGg4Du1PVVfmbvE07KHZnKk0HXTUBQgn0/74yE7/Lpdxxnlqm4d9QIBxfBiThLOhkOh2yyhJ0jD2KAiHspjFJOV+OCwrK8bEQy2KrLVKYC2eSQcrJYQlvXRA+4/l3onsD6zB1FZK+88NGNcwIjwYXOBHg3J7snJIbQvq2Vrqzh3xg1WqLkz/RHpzU+/n+hV0zqIwugycVVnJRojpcK0t+T1a/wDKy8FaygIAAA==",
"isBase64Encoded": True,
}
print(lambda_handler(payload, {}))