Alright,
So I'm aware of the AWS PHP SDK. I do not want to use it to make a curl call to invoke a lambda function.
I've found things about using API Gateway. I also do not want to use API Gateway. I just want to be like:
$endPoint = "https://urltoinvokethefunction"
$ch = curl_init();
$chOptions = [
CURLOPT_URL => $endPoint,
//credentials, headers, etc etc
];
curl_setopt_array($ch, $chOptions);
$result = curl_exec($ch);
Is this at all possible? I want it to be as simple as possible, just a straight curl call to invoke the function. As far as I understand it's what is happening in the SDK anyway, so it must be possible without using the SDK.
I know the most sensible way would be to use the SDK, and I have used it successfully before. I'm up against an unfortunate scenario of trying to add in custom business logic to an outdated, spider web of a CMS, and where the SDK is already included in a plugin I can't simply reuse the already namespaced SDK in a custom function.
tldr; writing a publish_post hook in Wordpress, can't use the AWS SDK because a plugin is already using it, just looking to make a straight curl call to invoke the function, not going to use API Gateway, how to?
****** UPDATE ******
Solved my problem, hanging head low... the reason I couldn't use the already loaded SDK was a versioning issue... d'oh. Stuck using a super old version for the time being, but it works.
The question still remains though, because I'm a stickler for simplicity, and I'd rather just know how to do it myself rather than import a super huge library (sledgehammer to hammer a nail kind of thing). Curious to hear a solution!