PHP code example of wangyieiz / aws-lambda-app

1. Go to this page and download the library: Download wangyieiz/aws-lambda-app library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wangyieiz / aws-lambda-app example snippets




use Wangyi\AwsLambdaApp\Invoke;

$Invoke = new Invoke([
    'credentials' => [
        'key'    => 'your key',
        'secret' => 'your secret'
    ],
    'region' => 'ap-southeast-2',
]);
$post_data = [
    "FunctionName" => "your FunctionName",
    "Payload" => "your payload"
];
$result = $Invoke->sendMessageToLambda($post_data);