You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-23Lines changed: 39 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
-
# AWS Lambda NodeJS-15 Runtime
1
+
# AWS Lambda NodeJS-16 Runtime
2
2
3
3
AWS Lambda runtime API implemented in Node.js. The supported version is usually the latest LTS.
4
4
5
5
It's easy to use this project and build Node.js runtime that will target any version - just replace the version number in `auto/package` with your preferred one.
6
6
7
7
## Current versions
8
8
9
-
* Node.js - **15.14.0**
10
-
* aws-sdk - **2.887.0**
9
+
* Node.js - **16.0.0**
10
+
* aws-sdk - **2.889.0**
11
11
12
12
## Goals
13
13
14
-
* Provide always up-to-date Node.js execution environment.
14
+
* Provide always up-to-date Node.js execution environment as a Lambda runtime layer and a Lambda container image.
15
15
* Include the most recent `aws-cli` library.
16
-
*MAke the runtime environment compatible with the default node12.x and node14.x environments
16
+
*Make the runtime environment compatible with the default node12.x and node14.x environments
17
17
18
18
## How to install?
19
19
@@ -39,8 +39,8 @@ Deploy the runtime layer using the following command:
@@ -146,7 +146,7 @@ Let's assume that your lambda function is packaged as `lambda.zip` file and the
146
146
```bash
147
147
aws lambda invoke \
148
148
--region us-east-2 \
149
-
--function-name node-15-runtime-example \
149
+
--function-name node-16-runtime-example \
150
150
--payload '{"hello":"world"}' \
151
151
output.txt
152
152
@@ -170,10 +170,7 @@ The context object is compatible with [the default node environments](https://do
170
170
*`awsRequestId` – The identifier of the invocation request.
171
171
*`logGroupName` – The log group for the function.
172
172
*`logStreamName` – The log stream for the functioninstance.
173
-
*`callbackWaitsForEmptyEventLoop` – Set to false to send the response right away when the callback executes, instead of waiting for the Node.js event loop to be empty. If false, any outstanding events will continue to run during the next invocation.
174
-
175
-
### Not yet supported properties
176
-
173
+
*`callbackWaitsForEmptyEventLoop` – Set to false to send the response right away when the callback executes, instead of waiting for the Node.js event loop to be empty.
177
174
*`identity` - Information about the Amazon Cognito identity that authorized the request.
178
175
*`clientContext` - Client context provided to the Lambda invoker by the client application.
179
176
@@ -201,3 +198,22 @@ AWS_LAMBDA_LOG_GROUP_NAME AWS_LAMBDA_LOG_STREAM_NAME|Yes|The name of the Amazon
|AWS_LAMBDA_RUNTIME_API|Yes|(custom runtime) The host and port of the [runtime API](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-api.html).|
201
+
202
+
## The base container image
203
+
204
+
The releases include a base Docker image that is compatible with the Lambda Container runtime and it's compatible with the Node.js Lambda runtime.
205
+
206
+
### Using the base image
207
+
208
+
The example below assumes that the Dockerfile is in the root folder of the Lambda project and there's an `index.js` file that exports the handler function called `handler`.
209
+
210
+
```Dockerfile
211
+
FROM janaz/aws-lambda-node-runtime:test-1
212
+
213
+
COPY . ${LAMBDA_TASK_ROOT}
214
+
RUN npm install
215
+
216
+
CMD ["index.handler"]
217
+
```
218
+
219
+
The image created from that `Dockerfile` should be uploaded to your ECR registry and referenced in the Lambda configuration.
0 commit comments