@@ -75,7 +75,8 @@ kotlin {
7575
7676There are two types of lambda functions:
7777
78- ** Buffered** Lambda function collects all the data it needs to return as a response before sending
78+ ###Buffered
79+ Buffered Lambda function collects all the data it needs to return as a response before sending
7980it back. This is a default behavior of Lambda function. Response payload max size: 6 MB.
8081
8182``` kotlin
@@ -95,7 +96,8 @@ class HelloWorldLambdaHandler : LambdaBufferedHandler<APIGatewayV2Request, APIGa
9596}
9697```
9798
98- ** Streaming** functions, on the other hand, sends back data as soon as it's available, rather than
99+ ###Streaming
100+ Streaming function, on the other hand, sends back data as soon as it's available, rather than
99101waiting for all the data to be ready. It processes and returns the response in chunks, piece by
100102piece, which can be useful when you want to start delivering results right away, especially for
101103large or ongoing tasks. This allows for faster responses and can handle data as it comes
@@ -122,7 +124,7 @@ class SampleStreamingHandler : LambdaStreamHandler<ByteArray, ByteWriteChannel>
122124fun main () = LambdaRuntime .run { HelloWorldLambdaHandler () }
123125```
124126
125- For SampleStreamingHandler
127+ Or for SampleStreamingHandler
126128
127129``` kotlin
128130fun main () = LambdaRuntime .run { SampleStreamingHandler () }
@@ -133,9 +135,9 @@ For more examples refer to project's sample.
133135
134136## Testing Runtime locally
135137
136- To run local runtime
138+ To run runtime
137139locally [ aws runtime emulator] ( https://github.com/aws/aws-lambda-runtime-interface-emulator ) is
138- used:
140+ used. Here's how to run project's sample :
139141
1401421 . ` ./gradlew build ` to build lambda executable
1411432 . Modify runtime-emulator/Dockerfile to set proper path to the generated executable (.kexe) file,
@@ -144,7 +146,6 @@ used:
1441464 . Start server ` docker run -p 9000:8080 sample:latest `
1451475 . Execute function
146148 via ` curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}' `
147- 6 . ` docker ps; docker stop CONTAINER_ID ` to stop the execution
148149
149150## Build and deploy to AWS
150151
0 commit comments