File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,24 @@ An API client for Lambda.
1010``` cli
1111composer require async-aws/lambda
1212```
13+
14+ ## Usage
15+
16+ ``` cli
17+ export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
18+ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
19+ ```
20+ See [ docs/authentication.md] ( https://github.com/async-aws/aws/blob/master/docs/authentication.md ) to see how to authenticate against AWS server.
21+
22+ ``` php
23+ $client = new LambdaClient([
24+ 'region' => 'us-east-1',
25+ ]);
26+
27+ $result = $client->invoke([
28+ 'FunctionName' => 'app-dev-hello_world', // Find it here: https://console.aws.amazon.com/lambda/home?region=us-east-1#/functions
29+ 'Payload' => '{"name": "async-aws/lambda"}',
30+ ]);
31+
32+ $result->getPayload(); // hello async-aws/lambda
33+ ```
You can’t perform that action at this time.
0 commit comments