Skip to content

Commit 5cb7df1

Browse files
author
Tomasz Janowski
committed
Node 14.0.0, aws-sdk 2.666.0
1 parent 3b90d60 commit 5cb7df1

4 files changed

Lines changed: 49 additions & 30 deletions

File tree

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
FROM node:10.15.3-jessie-slim@sha256:83175f2607e3bf5059cb1a10e7c790735ae6ba1b71fa794c06336293da007291
1+
FROM node:14.0.0-stretch-slim@sha256:e0601687209fbfa4008d23b6e49a61c0f856e4dab8e686945ff5e616178ce586
22

33
RUN apt-get update && apt-get install -y p7zip-full curl xz-utils && apt-get clean all
4-

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# AWS Lambda NodeJS-10 LTS Runtime
1+
# AWS Lambda NodeJS-14 LTS Runtime
22

33
AWS Lambda runtime API implemented in Node.js. The supported version is usually the latest LTS.
44

55
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.
66

77
## Current versions
88

9-
* Node.js - **10.15.3**
10-
* aws-sdk - **2.422.0**
9+
* Node.js - **14.0.0**
10+
* aws-sdk - **2.666.0**
1111

1212
## Goals
1313

@@ -39,8 +39,8 @@ Deploy the runtime layer using the following command:
3939

4040
```bash
4141
aws lambda publish-layer-version \
42-
--layer-name node-10-runtime \
43-
--description "nodejs-10.15.3 aws-cli-2.422.0" \
42+
--layer-name node-14-runtime \
43+
--description "nodejs-14.0.0 aws-cli-2.666.0" \
4444
--compatible-runtimes provided \
4545
--license-info Apache-2.0 \
4646
--zip-file fileb://stage/layer.zip
@@ -49,14 +49,14 @@ aws lambda publish-layer-version \
4949
The output will look like this:
5050
```json
5151
{
52-
"LayerVersionArn": "arn:aws:lambda:us-east-2:356111732087:layer:node-10-runtime:1",
53-
"Description": "nodejs-10.15.3 aws-cli-2.422.0",
52+
"LayerVersionArn": "arn:aws:lambda:us-east-2:356111732087:layer:node-14-runtime:1",
53+
"Description": "nodejs-14.0.0 aws-cli-2.666.0",
5454
"CreatedDate": "2018-12-02T22:32:00.572+0000",
55-
"LayerArn": "arn:aws:lambda:us-east-2:356111732087:layer:node-10-runtime",
55+
"LayerArn": "arn:aws:lambda:us-east-2:356111732087:layer:node-14-runtime",
5656
"Content": {
5757
"CodeSize": 18104889,
5858
"CodeSha256": "VonrpX23FWJOmE4lvhpox+9PS9kuY4sng0o0wxNTROs=",
59-
"Location": "https://awslambda-us-east-2-layers.s3.us-east-2.amazonaws.com/snapshots/356111732087/node-10-runtime-f3415c38-d865-46b6-ae42-009985092116?......"
59+
"Location": "https://awslambda-us-east-2-layers.s3.us-east-2.amazonaws.com/snapshots/356111732087/node-14-runtime-f3415c38-d865-46b6-ae42-009985092116?......"
6060
},
6161
"Version": 1,
6262
"CompatibleRuntimes": [
@@ -72,7 +72,7 @@ You can share the layer with other AWS accounts by executing the following comma
7272

7373
```bash
7474
aws lambda add-layer-version-permission \
75-
--layer-name node-10-runtime \
75+
--layer-name node-14-runtime \
7676
--version-number 1 \
7777
--principal "*" \
7878
--statement-id publish \
@@ -84,7 +84,7 @@ Response:
8484
```json
8585
{
8686
"RevisionId": "8b5b2e27-5013-4983-ac1a-9008dff90bac",
87-
"Statement": "{\"Sid\":\"publish\",\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"lambda:GetLayerVersion\",\"Resource\":\"arn:aws:lambda:us-east-2:356111732087:layer:node-10-runtime:1\"}"
87+
"Statement": "{\"Sid\":\"publish\",\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"lambda:GetLayerVersion\",\"Resource\":\"arn:aws:lambda:us-east-2:356111732087:layer:node-14-runtime:1\"}"
8888
}
8989
```
9090

@@ -103,11 +103,11 @@ Let's assume that your lambda function is packaged as `lambda.zip` file and the
103103
```bash
104104
aws lambda create-function \
105105
--region us-east-2 \
106-
--function-name node-10-runtime-example \
106+
--function-name node-14-runtime-example \
107107
--zip-file fileb://lambda.zip \
108108
--handler hello.handler \
109109
--runtime provided \
110-
--layers "arn:aws:lambda:us-east-2:356111732087:layer:node-10-runtime:2" \
110+
--layers "arn:aws:lambda:us-east-2:356111732087:layer:node-14-runtime:2" \
111111
--role arn:aws:iam::356111732087:role/lambda-role
112112
out.txt
113113
```
@@ -119,10 +119,10 @@ Let's assume that your lambda function is packaged as `lambda.zip` file and the
119119
"Layers": [
120120
{
121121
"CodeSize": 18104889,
122-
"Arn": "arn:aws:lambda:us-east-2:356111732087:layer:node-10-runtime:1"
122+
"Arn": "arn:aws:lambda:us-east-2:356111732087:layer:node-14-runtime:1"
123123
}
124124
],
125-
"FunctionName": "node-10-runtime-example",
125+
"FunctionName": "node-14-runtime-example",
126126
"LastModified": "2018-12-02T22:59:10.408+0000",
127127
"RevisionId": "32e7e8a1-b5ba-4388-b6be-596278e36126",
128128
"MemorySize": 128,
@@ -136,7 +136,7 @@ Let's assume that your lambda function is packaged as `lambda.zip` file and the
136136
"CodeSha256": "shSeSmJZHv8Z0WmOAcFcHeSUGbRYRR1cFdbEudkSJHo=",
137137
"Description": "",
138138
"CodeSize": 340,
139-
"FunctionArn": "arn:aws:lambda:us-east-2:356111732087:function:node-10-runtime-example",
139+
"FunctionArn": "arn:aws:lambda:us-east-2:356111732087:function:node-14-runtime-example",
140140
"Handler": "hello.handler"
141141
}
142142
```
@@ -146,7 +146,7 @@ Let's assume that your lambda function is packaged as `lambda.zip` file and the
146146
```bash
147147
aws lambda invoke \
148148
--region us-east-2 \
149-
--function-name node-10-runtime-example \
149+
--function-name node-14-runtime-example \
150150
--payload '{"hello":"world"}' \
151151
output.txt
152152

auto/package

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
set -ex
44

5-
export NODE_VERSION=10.15.3
6-
export SHA256=faddbe418064baf2226c2fcbd038c3ef4ae6f936eb952a1138c7ff8cfe862438
5+
export NODE_VERSION=14.0.0
6+
export SHA256=a2aaaa621074e1b56bb751bda53ce726319fac617587443371c0a7742481e5b6
77

88
DIR="$( cd "$( dirname "$0" )" && pwd )"
99

auto/publish

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,40 @@ DIR="$( cd "$( dirname "$0" )" && pwd )"
66

77
cd "${DIR}/.."
88

9-
for R in us-east-2 us-east-1 us-west-1 us-west-2 \
10-
ap-south-1 ap-northeast-2 \
11-
ap-southeast-1 ap-southeast-2 ap-northeast-1 \
12-
ca-central-1 eu-central-1 eu-west-1 eu-west-2 \
13-
eu-west-3 sa-east-1 ; do
9+
# https://docs.aws.amazon.com/general/latest/gr/lambda-service.html
10+
REGIONS="
11+
af-south-1
12+
ap-east-1
13+
ap-northeast-1
14+
ap-northeast-2
15+
ap-south-1
16+
ap-southeast-1
17+
ap-southeast-2
18+
ca-central-1
19+
eu-central-1
20+
eu-north-1
21+
eu-south-1
22+
eu-west-1
23+
eu-west-2
24+
eu-west-3
25+
me-south-1
26+
sa-east-1
27+
us-east-1
28+
us-east-2
29+
us-west-1
30+
us-west-2
31+
"
32+
33+
for R in $REGIONS ; do
1434
echo "Deploying in ${R}"
15-
docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN --rm \
35+
docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY --rm \
1636
-w /app \
1737
-v $(pwd):/app \
18-
janaz/aws-cli:1.16.67-alpine \
38+
janaz/aws-cli:1.18.41-alpine \
1939
lambda publish-layer-version \
2040
--region "${R}" \
21-
--layer-name node-10-runtime \
22-
--description "nodejs-10.15.3 aws-cli-2.422.0" \
41+
--layer-name node-14-runtime \
42+
--description "nodejs-14.0.0 aws-cli-2.666.0" \
2343
--compatible-runtimes provided \
2444
--license-info Apache-2.0 \
2545
--zip-file fileb://stage/layer.zip

0 commit comments

Comments
 (0)