Calling dotnet core Lambda API direct from PHP

Usually a API Gateway is placed in front of a Lambda to allow HTTP requests to be forwarded to a Lambda function. However even when using the HTTP API this still costs $1 per million invocations. To save costs I have setup the PHP website to call the Lambda function direct. Here is how to call the Lambda function and pass the request