Skip to content

Commit 4a7ee57

Browse files
committed
feat(Madde Analizi): Madde analizi geliştirildi.
1 parent 04b5429 commit 4a7ee57

File tree

6 files changed

+1209
-27
lines changed

6 files changed

+1209
-27
lines changed

README.MD

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The basics of using [SAM Cli][1] for AWS Lambda PHP applications.
88
3. Select one under the options
99
1. Create php binary by following steps in [`doc/create_php_binary.md`][4]
1010
2. Use prebuilt [Php 7.3.1][5]
11-
3. Just put the yml this projects ARN `arn:aws:lambda:eu-central-1:303814004728:layer:aws-lambda-layer-php-7-3-1:3`
11+
3. Just put the yml this projects ARN `arn:aws:lambda:eu-central-1:303814004728:layer:aws-lambda-layer-php-7-3-1:6`
1212
4. Write your serverless application (!) - the default is in `src/handlers/hello.php`
1313
5. Run `./deploy.sh` to deploy to Lambda
1414

@@ -28,8 +28,26 @@ Hello world looks like:
2828
}
2929

3030
## Local Tests
31-
Run `echo "hi" | sam local invoke "HelloPhp73"`
32-
Result: `{"msg":"hello from PHP 7.3.1","eventData":"hi\n","data":null}`
31+
#### Input stream as event
32+
Run:
33+
`echo "hi" | sam local invoke HelloPhp73`
34+
Result:
35+
`{"msg":"hello from PHP 7.3.1","eventData":"hi\n","data":null}`
36+
#### File stream as event
37+
Run:
38+
`sam local invoke HelloPhp73 --event=events/hello.sampledata.json`
39+
Result:
40+
```
41+
{
42+
"msg": "hello from PHP 7.3.1",
43+
"eventData": "{\n \"id\": \"ulbimesm12ym12kmzkzfgkzkuzeyfg\",\n \"name\": \"Lambda\",\n \"icon\": \"\u03bb\"\n}",
44+
"data": {
45+
"id": "ulbimesm12ym12kmzkzfgkzkuzeyfg",
46+
"name": "Lambda",
47+
"icon": "\u03bb"
48+
}
49+
}
50+
```
3351

3452

3553
[1]: https://github.com/awslabs/aws-sam-cli

events/hello.sampledata.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"id": "ulbimesm12ym12kmzkzfgkzkuzeyfg",
3+
"name": "Lambda",
4+
"icon": "λ"
5+
}

0 commit comments

Comments
 (0)