@@ -101,7 +101,7 @@ Streaming function, on the other hand, sends back data as soon as it's available
101
101
waiting for all the data to be ready. It processes and returns the response in chunks, piece by
102
102
piece, which can be useful when you want to start delivering results right away, especially for
103
103
large or ongoing tasks. This allows for faster responses and can handle data as it comes
104
- in. [ More details here. ] ( https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html ) .
104
+ in. [ More details here] ( https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html ) .
105
105
For example, ` SampleStreamingHandler ` reads a large json file and streams it by chunks.
106
106
107
107
``` kotlin
@@ -154,16 +154,15 @@ used. Here's how to run project's sample:
154
154
locate Lambda handler's executable file, e.g. ` YOUR_MODULE.kexe ` . The name of the file (including
155
155
the extension) will be used as ` handler ` name. Don't forget to specify it upon
156
156
lambda-function creation.
157
- 3 .
158
- Execute ` (echo '#!/bin/sh' > bootstrap && echo './"$_HANDLER"' >> bootstrap && chmod +x bootstrap && zip -r bootstrap.zip ./*) `
157
+ 3 . Execute ` (echo '#!/bin/sh' > bootstrap && echo './"$_HANDLER"' >> bootstrap && chmod +x bootstrap && zip -r bootstrap.zip ./*) `
159
158
4 . Deploy bootstrap.zip archive to AWS. If you have never used AWS Lambda
160
159
before, [ learn how to deploy Lambda function as zip archive manually] ( https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-zip.html )
161
160
or
162
161
using [ AWS CLI] ( https://docs.aws.amazon.com/codedeploy/latest/userguide/getting-started-codedeploy.html ) :
163
162
164
163
``` bash
165
164
$ aws lambda create-function --function-name sample \
166
- --handler sample.kexe \ # Important to specify the name of the Lambda\'s executable
165
+ --handler sample.kexe \ # Important to specify the name of the Lambda executable
167
166
--zip-file bootstrap.zip \
168
167
--runtime provided.al2023 \ # Change this to provided.al2 if you would like to use Amazon Linux 2
169
168
--role arn:aws:iam::XXXXXXXXXXXXX:role/your_lambda_execution_role \
@@ -186,7 +185,7 @@ $ cat output.json
186
185
187
186
The Runtime uses AWS logging conventions for enhanced log capture, supporting String and JSON log
188
187
output
189
- format. It also allows you to dynamically control log levels without altering your code, simplifying
188
+ format. It also allows to dynamically control log levels without altering your code, simplifying
190
189
the debugging process. Additionally, you can direct logs to specific Amazon CloudWatch log groups,
191
190
making log management and aggregation more efficient at scale. More details on how to set log format
192
191
and level refer to the article.
0 commit comments