Provides common AWS functionality in an lightweight library (only 10% of the size of the official PHP SDK!)
use com\amazon\aws\{Credentials, ServiceEndpoint};
use util\Secret;
use util\cmd\Console;
use util\log\Logging;
$credentials= new Credentials($accessKey, new Secret($secretKey));
$api= (new ServiceEndpoint('lambda', $credentials))->in('eu-central-1')->version('2015-03-31');
$api->setTrace(Logging::all()->toConsole());
$r= $api->resource('/functions/greet/invocations')->transmit(['name' => getenv('USER')]);
Console::writeLine($r);
Console::writeLine($r->value());
use com\amazon\aws\{ServiceEndpoint, Credentials};
use util\cmd\Console;
$api= new ServiceEndpoint('s3', new Credentials(
getenv('AWS_ACCESS_KEY_ID'),
getenv('AWS_SECRET_ACCESS_KEY'),
getenv('AWS_SESSION_TOKEN')
));
$link= $api->in('eu-central-1')->using('my-bucket')->sign('/path/to/resource.png', timeout: 180);
Console::writeLine($link);