#!/usr/bin/env python3
import json
import requests

HOST = "localhost"
PORT = "9000"

LAMBDA_URL = f"http://{HOST}:{PORT}/2015-03-31/functions/function/invocations"

payload = {
    "Records": [
        {
            "body": json.dumps(
                {
                    "task_id": "e31f2f21-175b-4a91-a3ec-a6baa325e917",
                    "sub_task_id": "8673913b-1a88-42d7-8578-0449123d94b0",
                    "s3_uri": "s3://retrofit-data-dev/ara_raw_inputs/calico/missinguprn.csv",
                }
            )
        }
    ]
}

response = requests.post(LAMBDA_URL, json=payload)

print("Status code:", response.status_code)
print("Response:")
print(response.text)
