Model/applications/SAL/local_handler/invoke_local_lambda.py
Jun-te Kim 5b677dedbe SAL
2026-05-22 08:15:11 +00:00

16 lines
353 B
Python
Executable file

#!/usr/bin/env python3
import json
import requests
HOST = "localhost"
PORT = "9002"
LAMBDA_URL = f"http://{HOST}:{PORT}/2015-03-31/functions/function/invocations"
payload = {"Records": [{"body": json.dumps({})}]}
response = requests.post(LAMBDA_URL, json=payload)
print("Status code:", response.status_code)
print("Response:")
print(response.text)